projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fgets() returns NULL on error, not < 0
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
5477fd0
..
ef5233c
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-159,7
+159,7
@@
FILE *ask_and_open(const char *filename, const char *what, const char *mode) {
what, filename);
fflush(stdout);
- if(fgets(buf, sizeof buf, stdin)
< 0
) {
+ if(fgets(buf, sizeof buf, stdin)
== NULL
) {
fprintf(stderr, "Error while reading stdin: %s\n",
strerror(errno));
return NULL;