Skip to content

Commit

Permalink
s3: passdb: ret doesn't seem to be needed at all
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Tue Oct  1 00:28:44 UTC 2019 on sn-devel-184
  • Loading branch information
noelpower authored and jrasamba committed Oct 1, 2019
1 parent ee63004 commit 84fae0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source3/passdb/pdb_ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 84fae0e

Please sign in to comment.