summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-06 12:50:25 +0100
committerVolker Lendecke <vl@samba.org>2009-12-06 13:07:04 +0100
commit3b8e85d68f11321988232ff4cfea481cc0862b2d (patch)
treea8a2cd6951adea8b561447be02ac6719d3d0a4f9 /source3/rpc_server
parent1ba91c0a51e173bbf6616b2bb4ea778acd0c5dc8 (diff)
downloadsamba-3b8e85d68f11321988232ff4cfea481cc0862b2d.tar.gz
samba-3b8e85d68f11321988232ff4cfea481cc0862b2d.tar.bz2
samba-3b8e85d68f11321988232ff4cfea481cc0862b2d.zip
s3: talloc_array_length deals file with a NULL argument
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index d5df0da849..f85dcd3fb2 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -433,7 +433,7 @@ static struct wkssvc_NetWkstaEnumUsersCtr0 *create_enum_users0(
return NULL;
}
- num_users = (users) ? talloc_array_length(users) : 0;
+ num_users = talloc_array_length(users);
ctr0->entries_read = num_users;
ctr0->user0 = talloc_array(ctr0, struct wkssvc_NetrWkstaUserInfo0,
num_users);
@@ -481,7 +481,7 @@ static struct wkssvc_NetWkstaEnumUsersCtr1 *create_enum_users1(
TALLOC_FREE(ctr1);
return NULL;
}
- num_users = (users) ? talloc_array_length(users) : 0;
+ num_users = talloc_array_length(users);
dom_users = get_domain_userlist(talloc_tos());
if (dom_users == NULL && errno != 0) {
@@ -489,7 +489,7 @@ static struct wkssvc_NetWkstaEnumUsersCtr1 *create_enum_users1(
TALLOC_FREE(users);
return NULL;
}
- num_dom_users = (dom_users) ? talloc_array_length(dom_users) : 0;
+ num_dom_users = talloc_array_length(dom_users);
ctr1->user1 = talloc_array(ctr1, struct wkssvc_NetrWkstaUserInfo1,
num_users+num_dom_users);