summaryrefslogtreecommitdiff
path: root/usr.bin/tset
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
commitca817738feb3dbccb047a79a8bba9d9ef8d35bef (patch)
tree1b3c3d53c613c58ec3dd701858f5ea0679e7260a /usr.bin/tset
parent5322f980d2221f7cb9600d5bd4b0e15ab30164bd (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.c6
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';