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:
Peter Hutterer 2018-10-16 09:42:51 +10:00
parent dda2323d23
commit bd5fe7593f

View File

@ -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);