From: Volker Lendecke Date: Thu, 15 Nov 2018 09:40:50 +0000 (+0100) Subject: dsdb: Slightly simplify samdb_check_password X-Git-Tag: tdb-1.3.17~748 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=579ce3eb4e5b14159cfe20d00f0ba7e4801f2944;p=thirdparty%2Fsamba.git dsdb: Slightly simplify samdb_check_password Avoid an "else" where we have the early return Signed-off-by: Volker Lendecke Reviewed-by: Björn Baumbach Reviewed-by: Jeremy Allison --- diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index e7b860df1bc..7ce5168c6c7 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2153,17 +2153,16 @@ enum samr_ValidationStatus samdb_check_password(TALLOC_CTX *mem_ctx, DEBUG(0, ("check_password_complexity: check password script took too long!\n")); TALLOC_FREE(password_script); return SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR; - } else { - DEBUG(5,("check_password_complexity: check password script (%s) " - "returned [%d]\n", password_script, check_ret)); - - if (check_ret != 0) { - DEBUG(1,("check_password_complexity: " - "check password script said new password is not good " - "enough!\n")); - TALLOC_FREE(password_script); - return SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH; - } + } + DEBUG(5,("check_password_complexity: check password script (%s) " + "returned [%d]\n", password_script, check_ret)); + + if (check_ret != 0) { + DEBUG(1,("check_password_complexity: " + "check password script said new password is not good " + "enough!\n")); + TALLOC_FREE(password_script); + return SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH; } TALLOC_FREE(password_script);