diff --git a/hw/kdrive/linux/bus.c b/hw/kdrive/linux/bus.c index ba8a6cd43..93c3ea5f3 100644 --- a/hw/kdrive/linux/bus.c +++ b/hw/kdrive/linux/bus.c @@ -72,7 +72,7 @@ BusInit (KdPointerInfo *pi) { for (i = 0; i < NUM_BUS_NAMES; i++) { - if ((fd = open (BusNames[i], 0)) > 0) + if ((fd = open (BusNames[i], 0)) >= 0) { close(fd); if (pi->path) @@ -84,7 +84,7 @@ BusInit (KdPointerInfo *pi) } else { - if ((fd = open(pi->path, 0)) > 0) + if ((fd = open(pi->path, 0)) >= 0) { close(fd); return Success; @@ -99,7 +99,7 @@ BusEnable (KdPointerInfo *pi) { int fd = open(pi->path, 0); - if (fd > 0) + if (fd >= 0) { KdRegisterFd(fd, BusRead, pi); pi->driverPrivate = (void *)fd; diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index bce5aae58..3b7828a3f 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -253,7 +253,7 @@ configureInputSection (void) int fd; #ifdef WSCONS_SUPPORT fd = open("/dev/wsmouse", 0); - if (fd > 0) { + if (fd >= 0) { DFLT_MOUSE_DEV = "/dev/wsmouse"; DFLT_MOUSE_PROTO = "wsmouse"; close(fd); diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index 73409dfba..09d178797 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -336,7 +336,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr) { struct mtrr_wc_region *p, *prev; - if (mtrr_fd > 0) { + if (mtrr_fd >= 0) { p = wcr; while (p) { if (p->added)