From: Andreas Schneider Date: Thu, 1 Mar 2018 10:04:49 +0000 (+0100) Subject: auth:credentials: Avoid an 'else' branch X-Git-Tag: talloc-2.1.12~332 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=654a66b72dcf99884dafcf3659f513b634073da8;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett --- 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));