s3-netapi: Fix Coverity #775 (REVERSE_INULL).
authorGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:19:59 +0000 (11:19 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:19:59 +0000 (11:19 +0100)
Guenther

source3/lib/netapi/user.c

index 8cc65a6e9eb0a1e622995ac3f1a8da16441c4887..b1bd27af2a593f5842940a56023d811fcec06be7 100644 (file)
@@ -3242,6 +3242,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
        *r->out.buffer = NULL;
        *r->out.entries_read = 0;
 
        *r->out.buffer = NULL;
        *r->out.entries_read = 0;
+       *r->out.total_entries = 0;
 
        switch (r->in.level) {
                case 0:
 
        switch (r->in.level) {
                case 0:
@@ -3402,12 +3403,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 (ctx->disable_policy_handle_cache) {
 
  done:
        if (ctx->disable_policy_handle_cache) {