mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34: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:
parent
9a971bcd07
commit
654a66b72d
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user