int r;
r = pwq_allocate_context(&pwq);
- if (ERRNO_IS_NOT_SUPPORTED(r))
- return 0;
- if (r < 0)
+ if (r < 0) {
+ if (ERRNO_IS_NOT_SUPPORTED(r))
+ return 0;
return log_error_errno(r, "Failed to allocate libpwquality context: %m");
+ }
suggestions = new0(char*, N_SUGGESTIONS+1);
if (!suggestions)
assert(password);
r = pwq_allocate_context(&pwq);
- if (ERRNO_IS_NOT_SUPPORTED(r))
- return 0;
- if (r < 0)
+ if (r < 0) {
+ if (ERRNO_IS_NOT_SUPPORTED(r))
+ return 0;
return log_debug_errno(r, "Failed to allocate libpwquality context: %m");
+ }
r = sym_pwquality_check(pwq, password, NULL, username, &auxerror);
if (r < 0) {