]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-netapi: Fix Coverity #775 (REVERSE_INULL).
authorGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:34:43 +0000 (11:34 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 20 Mar 2009 10:34:43 +0000 (11:34 +0100)
Guenther

source/lib/netapi/user.c

index 1f4b03f677b4ded0aacf8d8105291c0699504a55..e732501c93b92be1197a5bd92935e537e8724d2c 100644 (file)
@@ -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) {