various: use _NEG_ macros to reduce indentation
No functional change intended.
This commit is contained in:
@@ -792,13 +792,11 @@ static int prompt_root_password(int rfd) {
|
||||
}
|
||||
|
||||
r = check_password_quality(*a, /* old */ NULL, "root", &error);
|
||||
if (r < 0) {
|
||||
if (ERRNO_IS_NOT_SUPPORTED(r))
|
||||
log_warning("Password quality check is not supported, proceeding anyway.");
|
||||
else
|
||||
return log_error_errno(r, "Failed to check password quality: %m");
|
||||
}
|
||||
if (r == 0)
|
||||
if (ERRNO_IS_NEG_NOT_SUPPORTED(r))
|
||||
log_warning("Password quality check is not supported, proceeding anyway.");
|
||||
else if (r < 0)
|
||||
return log_error_errno(r, "Failed to check password quality: %m");
|
||||
else if (r == 0)
|
||||
log_warning("Password is weak, accepting anyway: %s", error);
|
||||
|
||||
r = ask_password_tty(-1, msg2, NULL, 0, 0, NULL, &b);
|
||||
|
||||
Reference in New Issue
Block a user