From: Günther Deschner Date: Fri, 20 Mar 2009 10:34:43 +0000 (+0100) Subject: s3-netapi: Fix Coverity #775 (REVERSE_INULL). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b0f612c52e992cd130f5176432722bada3c64e4;p=thirdparty%2Fsamba.git s3-netapi: Fix Coverity #775 (REVERSE_INULL). Guenther --- diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c index 1f4b03f677b..e732501c93b 100644 --- a/source/lib/netapi/user.c +++ b/source/lib/netapi/user.c @@ -3297,6 +3297,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx, *r->out.buffer = NULL; *r->out.entries_read = 0; + *r->out.total_entries = 0; switch (r->in.level) { case 0: @@ -3458,12 +3459,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx, } } - if (r->out.entries_read) { - *r->out.entries_read = entries_read; - } - if (r->out.total_entries) { - *r->out.total_entries = entries_read; - } + *r->out.entries_read = entries_read; + *r->out.total_entries = entries_read; done: if (!cli) {