summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 18:59:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:25 -0500
commitbd1e853c19ddc0c731beb19d919e63e4df1fb0e0 (patch)
tree7b8c6ff38f2e5a0ffe3191c092b4fe0f5863195d
parented5095a4903abf41673b8d6c9fbd9a02b994a310 (diff)
downloadsamba-bd1e853c19ddc0c731beb19d919e63e4df1fb0e0.tar.gz
samba-bd1e853c19ddc0c731beb19d919e63e4df1fb0e0.tar.bz2
samba-bd1e853c19ddc0c731beb19d919e63e4df1fb0e0.zip
r14338: Fix coverity #55 by explicit cast.
Jeremy. (This used to be commit 1fece52da4d667fa182aa9a87aaee3917860448b)
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index a0b8b66f50..638b66bb9e 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -416,11 +416,14 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
if ( !info || (info->type != SVC_HANDLE_IS_SCM) )
return WERR_BADFID;
- if ( !(info->access_granted & SC_RIGHT_MGR_ENUMERATE_SERVICE) )
+ if ( !(info->access_granted & SC_RIGHT_MGR_ENUMERATE_SERVICE) ) {
return WERR_ACCESS_DENIED;
+ }
- if ( (num_services = enumerate_status( p->mem_ctx, &services, token )) == -1 )
+ num_services = enumerate_status( p->mem_ctx, &services, token );
+ if (num_services == (uint32)-1 ) {
return WERR_NOMEM;
+ }
for ( i=0; i<num_services; i++ ) {
buffer_size += svcctl_sizeof_enum_services_status(&services[i]);