projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
434e57a
)
fgets() returns NULL on error, not < 0
author
Sven-Haegar Koch
<haegar@sdinet.de>
Sat, 28 May 2011 01:48:07 +0000
(
03:48
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 28 May 2011 13:24:39 +0000
(15:24 +0200)
src/tincctl.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index 5477fd0e4b4cbb2139b93fcb1e2f39b07b9197be..ef5233c5866bfb199ac5be88b625ed82d467210b 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;