git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49b9185
)
examples:smbclient:fstatvfs: fix O3 error unused result of fgets
author
Michael Adam
<obnox@samba.org>
Tue, 5 Apr 2016 20:55:01 +0000
(22:55 +0200)
committer
Michael Adam
<obnox@samba.org>
Thu, 12 May 2016 22:16:17 +0000
(
00:16
+0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
examples/libsmbclient/testfstatvfs.c
patch
|
blob
|
history
diff --git
a/examples/libsmbclient/testfstatvfs.c
b/examples/libsmbclient/testfstatvfs.c
index 512563f3e6200dd5193560bde3cc532d0304b020..b2396e3fa1bedc74a5b1e4350f0c2e72bc88cf3e 100644
(file)
--- a/
examples/libsmbclient/testfstatvfs.c
+++ b/
examples/libsmbclient/testfstatvfs.c
@@
-25,7
+25,11
@@
int main(int argc, char * argv[])
{
fprintf(stdout, "Path: ");
*path = '\0';
{
fprintf(stdout, "Path: ");
*path = '\0';
- fgets(path, sizeof(path) - 1, stdin);
+ p = fgets(path, sizeof(path) - 1, stdin);
+ if (p == NULL) {
+ fprintf(stderr, "failed to read from stdin\n");
+ return 1;
+ }
if (strlen(path) == 0)
{
return 0;
if (strlen(path) == 0)
{
return 0;