Commit cfc3dec0 authored by Peter Hutterer's avatar Peter Hutterer Committed by Adam Jackson

xfree86: fix readlink call

Misplaced parenthesis caused us to compare the sizeof, not the readlink return
value.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit bd5fe759)
parent 2a0c6c15
Pipeline #5815 passed with stage
in 4 minutes and 46 seconds
......@@ -336,7 +336,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
char *node = strrchr(dev, '/') + 1;
if (asprintf(&sysfs_path, "/sys/class/graphics/%s", node) < 0 ||
readlink(sysfs_path, buf, sizeof(buf) < 0) ||
readlink(sysfs_path, buf, sizeof(buf)) < 0 ||
strstr(buf, "devices/pci")) {
free(sysfs_path);
close(fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment