From 76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 20 Mar 2009 11:17:50 +0100 Subject: [PATCH] s3-netapi: Fix Coverity #776 (REVERSE_INULL). Guenther (cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba) --- source/lib/netapi/group.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c index a78c784e38c..b3bb14e6953 100644 --- a/source/lib/netapi/group.c +++ b/source/lib/netapi/group.c @@ -1319,6 +1319,7 @@ WERROR NetGroupGetUsers_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: @@ -1408,13 +1409,8 @@ WERROR NetGroupGetUsers_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; werr = WERR_OK; -- 2.11.4.GIT