summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug.c2
-rw-r--r--inittab.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 7d7798b..91e874f 100644
--- a/debug.c
+++ b/debug.c
@@ -29,7 +29,7 @@ void debug_init(void)
regex_t pat_cmdline;
regmatch_t matches[2];
- if (!fd)
+ if (fd < 0)
return;
r = read(fd, line, sizeof(line) - 1);
diff --git a/inittab.c b/inittab.c
index 686d389..d73e0b8 100644
--- a/inittab.c
+++ b/inittab.c
@@ -139,7 +139,7 @@ static void askconsole(struct init_action *a)
regex_t pat_cmdline;
regmatch_t matches[2];
- if (!fd)
+ if (fd < 0)
return;
r = read(fd, line, sizeof(line) - 1);