mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Resource leakage: 0 is a valid file descriptor
When testing if an fd is valid, the required construct is >= 0, not > 0. [Daniel: Fixed up the Linux MTRR case as well.] Signed-off-by: Martin Ettl <ettl.martin@gmx.de> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
4151a13c80
commit
4df3e8c805
3 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue