From: Noel Power Date: Fri, 27 Sep 2019 07:07:24 +0000 (+0100) Subject: s3: passdb: ret doesn't seem to be needed at all X-Git-Tag: talloc-2.3.1~537 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84fae0ed1bb7f2ec1fad8011d42211582e46565a;p=thirdparty%2Fsamba.git s3: passdb: ret doesn't seem to be needed at all I was looking at the wrong hunk when examining this, ret seems redundant and the existing status can cover things Signed-off-by: Noel Power Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Oct 1 00:28:44 UTC 2019 on sn-devel-184 --- diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index aefd770ad31..e9b01e57c6c 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -2119,7 +2119,6 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods, static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct samu * newpwd) { - NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data; int rc; LDAPMessage *result = NULL; @@ -2338,8 +2337,8 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s break; } - ret = ldapsam_modify_entry(my_methods,newpwd,dn,mods,ldap_op, pdb_element_is_set_or_changed); - if (!NT_STATUS_IS_OK(ret)) { + status = ldapsam_modify_entry(my_methods,newpwd,dn,mods,ldap_op, pdb_element_is_set_or_changed); + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("ldapsam_add_sam_account: failed to modify/add user with uid = %s (dn = %s)\n", pdb_get_username(newpwd),dn)); ldap_mods_free(mods, true);