From 6ac672c7322a0e606ee14eaa522a396fe79b8e13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 20 Mar 2009 11:36:00 +0100 Subject: [PATCH] s3-netapi: Fix Coverity #774 (REVERSE_INULL). Guenther (cherry picked from commit 9bf3e129605d51483fd5ce47c90642f7e82ac102) --- source/lib/netapi/user.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c index e732501c93b..84d32dc1d55 100644 --- a/source/lib/netapi/user.c +++ b/source/lib/netapi/user.c @@ -2849,6 +2849,7 @@ WERROR NetUserGetGroups_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: @@ -2943,12 +2944,8 @@ WERROR NetUserGetGroups_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) { -- 2.11.4.GIT