mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
5dae28632b
commit
2ec0ecc7a5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user