]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/dsdb/common: clang: Fix 'The left operand of '&' is a garbage value'
authorNoel Power <noel.power@suse.com>
Fri, 5 Jul 2019 11:04:10 +0000 (11:04 +0000)
committerGary Lockyer <gary@samba.org>
Wed, 24 Jul 2019 04:19:27 +0000 (04:19 +0000)
Fixes:

source4/dsdb/common/util.c:1964:18: warning: The left operand of '&' is a garbage value <--[clang]
        return (options & DS_NTDSDSA_OPT_IS_GC) != 0;
                ~~~~~~~ ^

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/common/util.c

index 0e9945e98c6da73c595b736092ca81b36b8be748..7e6b5b490d16ccec3f6c40e525dea5a3ebe67749 100644 (file)
@@ -1957,7 +1957,7 @@ bool samdb_is_pdc(struct ldb_context *ldb)
 */
 bool samdb_is_gc(struct ldb_context *ldb)
 {
-       uint32_t options;
+       uint32_t options = 0;
        if (samdb_ntds_options(ldb, &options) != LDB_SUCCESS) {
                return false;
        }