summaryrefslogtreecommitdiff
path: root/auth/credentials
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-03-01 11:04:49 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-03-01 14:49:45 +0100
commit654a66b72dcf99884dafcf3659f513b634073da8 (patch)
tree76e4a8b7319bb921c3b1d2c121f27b45f27ea560 /auth/credentials
parent9a971bcd0799763966be6c3f1350130140e436e2 (diff)
downloadsamba-654a66b72dcf99884dafcf3659f513b634073da8.tar.gz
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>
Diffstat (limited to 'auth/credentials')
-rw-r--r--auth/credentials/credentials.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c
index f9a6bc3b13e..4663185c979 100644
--- a/auth/credentials/credentials.c
+++ b/auth/credentials/credentials.c
@@ -1284,11 +1284,14 @@ _PUBLIC_ bool cli_credentials_parse_password_fd(struct cli_credentials *credenti
*p = '\0'; /* null-terminate it, just in case... */
p = NULL; /* then force the loop condition to become false */
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:
fprintf(stderr, "Error reading password from file descriptor %d: %s\n",
fd, strerror(errno));