X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=ef5233c5866bfb199ac5be88b625ed82d467210b;hb=e6b21e1a510691a86dcc1ecdf71a80a7c62ff17f;hp=5477fd0e4b4cbb2139b93fcb1e2f39b07b9197be;hpb=434e57ae5ee79b3d990c4d75358047bad641998b;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index 5477fd0e..ef5233c5 100644 --- 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;