1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

auth:credentials: Avoid an 'else' branch

This moves the 'return' statement to the end of the 'case' and makes clear
we leave here.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2018-03-01 11:04:49 +01:00 committed by Andrew Bartlett
parent 9a971bcd07
commit 654a66b72d

View File

@ -1284,11 +1284,14 @@ _PUBLIC_ bool cli_credentials_parse_password_fd(struct cli_credentials *credenti
*p = '\0'; /* null-terminate it, just in case... */ *p = '\0'; /* null-terminate it, just in case... */
p = NULL; /* then force the loop condition to become false */ p = NULL; /* then force the loop condition to become false */
break; break;
} else {
fprintf(stderr, "Error reading password from file descriptor %d: %s\n", fd, "empty password\n");
return false;
} }
fprintf(stderr,
"Error reading password from file descriptor "
"%d: empty password\n",
fd);
return false;
default: default:
fprintf(stderr, "Error reading password from file descriptor %d: %s\n", fprintf(stderr, "Error reading password from file descriptor %d: %s\n",
fd, strerror(errno)); fd, strerror(errno));