xfree86: fix readlink call
Misplaced parenthesis caused us to compare the sizeof, not the readlink return value. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
dda2323d23
commit
bd5fe7593f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user