diff options
author | Michael Adam <obnox@samba.org> | 2016-04-05 22:34:32 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-05-13 00:16:16 +0200 |
commit | 5dae28632b05a80365ea8ebb9968c4eb2ee2b98a (patch) | |
tree | 661bcbd63438da30e51a3768a2be4736a0ab1720 /examples | |
parent | ac64aab40ec09f4dd6c3cc629bcf8f213b55d014 (diff) | |
download | samba-5dae28632b05a80365ea8ebb9968c4eb2ee2b98a.tar.gz |
examples:smbclient:testacl3: 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/testacl3.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/libsmbclient/testacl3.c b/examples/libsmbclient/testacl3.c index f34e273d6b7..59d9994ef39 100644 --- a/examples/libsmbclient/testacl3.c +++ b/examples/libsmbclient/testacl3.c @@ -27,7 +27,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) { + printf("Error reading from stdin\n"); + return 1; + } if (strlen(path) == 0) { return 0; |