mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
examples: Fix unchecked result warnings
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
af03f5b4e8
commit
7e45bec38f
@ -16,6 +16,7 @@ get_auth_data_fn(const char * pServer,
|
||||
char workgroup[256] = { '\0' };
|
||||
char username[256] = { '\0' };
|
||||
char password[256] = { '\0' };
|
||||
char *ret;
|
||||
|
||||
static int krb5_set = 1;
|
||||
|
||||
@ -36,7 +37,10 @@ get_auth_data_fn(const char * pServer,
|
||||
}
|
||||
|
||||
fprintf(stdout, "Workgroup: [%s] ", pWorkgroup);
|
||||
fgets(temp, sizeof(temp), stdin);
|
||||
ret = fgets(temp, sizeof(temp), stdin);
|
||||
if (ret == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (temp[strlen(temp) - 1] == '\n') /* A new line? */
|
||||
{
|
||||
@ -49,7 +53,10 @@ get_auth_data_fn(const char * pServer,
|
||||
}
|
||||
|
||||
fprintf(stdout, "Username: [%s] ", pUsername);
|
||||
fgets(temp, sizeof(temp), stdin);
|
||||
ret = fgets(temp, sizeof(temp), stdin);
|
||||
if (ret == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (temp[strlen(temp) - 1] == '\n') /* A new line? */
|
||||
{
|
||||
@ -62,7 +69,10 @@ get_auth_data_fn(const char * pServer,
|
||||
}
|
||||
|
||||
fprintf(stdout, "Password: ");
|
||||
fgets(temp, sizeof(temp), stdin);
|
||||
ret = fgets(temp, sizeof(temp), stdin);
|
||||
if (ret == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (temp[strlen(temp) - 1] == '\n') /* A new line? */
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user