Commit bd5fe759 authored by Peter Hutterer's avatar Peter Hutterer

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>
parent dda2323d
......@@ -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