summaryrefslogtreecommitdiff
path: root/usr/src/common/util/getresponse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/util/getresponse.c')
-rw-r--r--usr/src/common/util/getresponse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/src/common/util/getresponse.c b/usr/src/common/util/getresponse.c
index cc838a7ab1..992e81705f 100644
--- a/usr/src/common/util/getresponse.c
+++ b/usr/src/common/util/getresponse.c
@@ -125,7 +125,7 @@ yes_no(int (*func)(char *))
char ans[LINE_MAX + 1];
/* Get user's answer */
- for (i = 0; b = getchar(); i++) {
+ for (i = 0; (b = getchar()) != 0; i++) {
if (b == '\n' || b == '\0' || b == EOF)
break;
if (i < LINE_MAX)