summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-11 17:42:40 +0200
committerVolker Lendecke <vl@samba.org>2008-07-11 17:53:24 +0200
commit6c3c068716c9b7a3a7fe041fc605bcd00b376ec9 (patch)
tree05f7cd3f40e3f7530bc39a2d93b8f6ea9e182028 /source3/winbindd
parentdc753fd964bf1e4d05a9d053b58778d2d41df7b4 (diff)
downloadsamba-6c3c068716c9b7a3a7fe041fc605bcd00b376ec9.tar.gz
samba-6c3c068716c9b7a3a7fe041fc605bcd00b376ec9.tar.bz2
samba-6c3c068716c9b7a3a7fe041fc605bcd00b376ec9.zip
Revert "Tiny logic simplification -- remove an else branch"
This reverts commit 01c8c7bbf6163d5c7733db0d8ecbccfe7e4fec7d. (This used to be commit b0fe0c7ac18d4f47ad4a218114de7bab7a3f19de)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_idmap.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/source3/winbindd/winbindd_idmap.c b/source3/winbindd/winbindd_idmap.c
index 631f5c1ab4..98f8548083 100644
--- a/source3/winbindd/winbindd_idmap.c
+++ b/source3/winbindd/winbindd_idmap.c
@@ -241,31 +241,33 @@ enum winbindd_result winbindd_dual_sids2xids(struct winbindd_domain *domain,
result = idmap_sids_to_unixids(ids, num);
- if (!NT_STATUS_IS_OK(result)) {
- DEBUG (2, ("idmap_sids_to_unixids returned an error: 0x%08x\n",
- NT_STATUS_V(result)));
- talloc_free(ids);
- return WINBINDD_ERROR;
- }
+ if (NT_STATUS_IS_OK(result)) {
- xids = SMB_MALLOC_ARRAY(struct unixid, num);
- if ( ! xids) {
- DEBUG(0, ("Out of memory!\n"));
- talloc_free(ids);
- return WINBINDD_ERROR;
- }
+ xids = SMB_MALLOC_ARRAY(struct unixid, num);
+ if ( ! xids) {
+ DEBUG(0, ("Out of memory!\n"));
+ talloc_free(ids);
+ return WINBINDD_ERROR;
+ }
- for (i = 0; i < num; i++) {
- if (ids[i]->status == ID_MAPPED) {
- xids[i].type = ids[i]->xid.type;
- xids[i].id = ids[i]->xid.id;
- } else {
- xids[i].type = -1;
+ for (i = 0; i < num; i++) {
+ if (ids[i]->status == ID_MAPPED) {
+ xids[i].type = ids[i]->xid.type;
+ xids[i].id = ids[i]->xid.id;
+ } else {
+ xids[i].type = -1;
+ }
}
+
+ state->response.length = sizeof(state->response) + (sizeof(struct unixid) * num);
+ state->response.extra_data.data = xids;
+
+ } else {
+ DEBUG (2, ("idmap_sids_to_unixids returned an error: 0x%08x\n", NT_STATUS_V(result)));
+ talloc_free(ids);
+ return WINBINDD_ERROR;
}
- state->response.length = sizeof(state->response) + (sizeof(struct unixid) * num);
- state->response.extra_data.data = xids;
talloc_free(ids);
return WINBINDD_OK;
}