diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-10-10 21:38:17 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-10-10 21:38:17 +0000 |
commit | ca817738feb3dbccb047a79a8bba9d9ef8d35bef (patch) | |
tree | 1b3c3d53c613c58ec3dd701858f5ea0679e7260a /usr.bin/tset | |
parent | 5322f980d2221f7cb9600d5bd4b0e15ab30164bd (diff) |
fgets(3) returns NULL on error, not 0. No functional change, but it makes
the code easier to read.
OK deraadt
Diffstat (limited to 'usr.bin/tset')
-rw-r--r-- | usr.bin/tset/tset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c index 6ac79ba9d96..8d78d3c4594 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tset.c,v 1.27 2003/06/12 20:58:11 deraadt Exp $ */ +/* $OpenBSD: tset.c,v 1.28 2006/10/10 21:38:16 cloder Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -196,7 +196,7 @@ askuser(const char *dflt) (void) fprintf(stderr, "Terminal type? "); (void) fflush(stderr); - if (fgets(answer, sizeof(answer), stdin) == 0) { + if (fgets(answer, sizeof(answer), stdin) == NULL) { if (dflt == 0) { (void) fprintf(stderr, "\n"); exit(EXIT_FAILURE); @@ -530,7 +530,7 @@ get_termcap_entry(char *userarg) char buffer[BUFSIZ]; char *s, *t, *d; - while (fgets(buffer, sizeof(buffer) - 1, fp) != 0) { + while (fgets(buffer, sizeof(buffer) - 1, fp) != NULL) { for (s = buffer, t = d = 0; *s; s++) { if (isspace(CharOf(*s))) *s = '\0'; |