summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-14 20:32:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:28 -0500
commitbe2bc3147c562acf6472bd6f3b4eadb3d9115ba3 (patch)
treeba723b2767c747218a176d74492fe40b0bbb93d5 /source3/rpc_server
parenta1c56e451f7c4d6503330bed01a82312b0000f7b (diff)
downloadsamba-be2bc3147c562acf6472bd6f3b4eadb3d9115ba3.tar.gz
samba-be2bc3147c562acf6472bd6f3b4eadb3d9115ba3.tar.bz2
samba-be2bc3147c562acf6472bd6f3b4eadb3d9115ba3.zip
r14395: Fix coverity bug #55. Ensure no unsigned/signed comparisons.
Jeremy. (This used to be commit cd3ad3f1a6f622b4bad5cb21b132de4cc476e03f)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 638b66bb9e..6062dcee5c 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -404,7 +404,7 @@ static int enumerate_status( TALLOC_CTX *ctx, ENUM_SERVICES_STATUS **status, NT_
WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, SVCCTL_R_ENUM_SERVICES_STATUS *r_u)
{
ENUM_SERVICES_STATUS *services = NULL;
- uint32 num_services;
+ int num_services;
int i = 0;
size_t buffer_size = 0;
WERROR result = WERR_OK;
@@ -421,7 +421,7 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
}
num_services = enumerate_status( p->mem_ctx, &services, token );
- if (num_services == (uint32)-1 ) {
+ if (num_services == -1 ) {
return WERR_NOMEM;
}
@@ -444,7 +444,7 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
}
r_u->needed = (buffer_size > q_u->buffer_size) ? buffer_size : q_u->buffer_size;
- r_u->returned = num_services;
+ r_u->returned = (uint32)num_services;
if ( !(r_u->resume = TALLOC_P( p->mem_ctx, uint32 )) )
return WERR_NOMEM;