diff options
author | Michael Adam <obnox@samba.org> | 2016-04-05 22:36:34 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-05-13 00:16:16 +0200 |
commit | 2ec0ecc7a5022ff8fce9ce562cd3b41517477fcc (patch) | |
tree | c8d2eda4b84e2200d55e90fe01b75224ef9ca767 /examples | |
parent | 5dae28632b05a80365ea8ebb9968c4eb2ee2b98a (diff) | |
download | samba-2ec0ecc7a5022ff8fce9ce562cd3b41517477fcc.tar.gz |
examples:smbclient:notify: fix O3 error unused result from fgets
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/libsmbclient/testnotify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/libsmbclient/testnotify.c b/examples/libsmbclient/testnotify.c index 68513af0502..8760cf0ba08 100644 --- a/examples/libsmbclient/testnotify.c +++ b/examples/libsmbclient/testnotify.c @@ -43,7 +43,11 @@ int main(int argc, char * argv[]) fprintf(stdout, "Path: "); *path = '\0'; - fgets(path, sizeof(path) - 1, stdin); + p = fgets(path, sizeof(path) - 1, stdin); + if (p == NULL) { + fprintf(stderr, "error reading from stdin\n"); + return 1; + } if (strlen(path) == 0) { return 0; } |