]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-netapi: Fix Coverity #776 (REVERSE_INULL).
authorGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:17:50 +0000 (11:17 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:31:53 +0000 (11:31 +0100)
Guenther
(cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)

source/lib/netapi/group.c

index a78c784e38cf92e0fee66f8d81173f531b772c8c..b3bb14e6953b45a8ac34922b02c3a666e614e351 100644 (file)
@@ -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;