Skip to content

Commit

Permalink
Remove dev_path and increase path_length
Browse files Browse the repository at this point in the history
  • Loading branch information
D0023R authored and antonioginer committed Oct 1, 2023
1 parent 05929ec commit c81e2ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions custom_video_drmkms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,8 @@ bool drmkms_timing::init()

int drmkms_timing::get_master_fd()
{
const size_t path_length = 15;
char dev_path[path_length];
char procpath[50];
const size_t path_length = 20;
char procpath[path_length];
char fullpath[512];
char* actualpath;
struct stat st;
Expand Down Expand Up @@ -799,7 +798,7 @@ int drmkms_timing::get_master_fd()
continue;
actualpath = realpath(fullpath, NULL);
// Only check the device we expect
if (strncmp(dev_path, actualpath, path_length) != 0)
if (strncmp(m_drm_name, actualpath, path_length) != 0)
{
free(actualpath);
continue;
Expand Down

0 comments on commit c81e2ff

Please sign in to comment.