diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2017-11-03 13:08:29 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2017-11-03 13:08:29 +0000 |
| commit | aee1526ce71f788ba18fef6d9dc9f697655e7bbc (patch) | |
| tree | 617c3bea8f7a2e5a3969a8f3779b29aa9d1f5727 /lib/libc | |
| parent | 8974782e8992a3643b8a52b5d5a9f1e9378f0e2c (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdio/gets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c index c75dcc202cc9..06e56f7f0c3b 100644 --- a/lib/libc/stdio/gets.c +++ b/lib/libc/stdio/gets.c @@ -61,13 +61,13 @@ gets(char *buf) warned = 1; } for (s = buf; (c = __sgetc(stdin)) != '\n'; ) { - if (c == EOF) + if (c == EOF) { if (s == buf) { ret = NULL; goto end; } else break; - else + } else *s++ = c; } *s = 0; |
