From b53c7f6aa85c9ffc92384da7b7aeba911ad5b743 Mon Sep 17 00:00:00 2001
From: "Michael I. Bushnell" <mib@gnu.org>
Date: Wed, 19 Jun 1996 19:41:40 +0000
Subject: (init_ttys, reread_ttys): Test return value of setttyent correctly.

---
 init/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'init/init.c')

diff --git a/init/init.c b/init/init.c
index b542847a..76ebf968 100644
--- a/init/init.c
+++ b/init/init.c
@@ -526,7 +526,7 @@ init_ttys (void)
   ttys = malloc (ttyslen * sizeof (struct ttyent));
   bzero (ttys, ttyslen * sizeof (struct ttyent));
 
-  if (setttyent ())
+  if (!setttyent ())
     {
       perror (_PATH_TTYS);
       return 1;
@@ -653,7 +653,7 @@ reread_ttys (void)
   struct terminal *t;
   int on;
 
-  if (setttyent ())
+  if (!setttyent ())
     {
       perror (_PATH_TTYS);
       return;
-- 
cgit v1.2.3