mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
examples:smbclient:read: fix O3 error unused result of fgets
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
This commit is contained in:
parent
398bb129f5
commit
b279aa1f7c
@ -24,7 +24,11 @@ int main(int argc, char * argv[])
|
|||||||
{
|
{
|
||||||
fprintf(stdout, "Path: ");
|
fprintf(stdout, "Path: ");
|
||||||
*path = '\0';
|
*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)
|
if (strlen(path) == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user