dsdb/password_hash: don't double assign variables (CID 1363048, 1034720)
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 22 May 2019 21:59:51 +0000 (09:59 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 6 Jul 2020 13:56:17 +0000 (13:56 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul  6 13:56:17 UTC 2020 on sn-devel-184

source4/dsdb/samdb/ldb_modules/password_hash.c

index 00f21307d90f51153a1c86301eaa2a669f81456f..bfdfa51595a5f9e62f95978353e03983b4d5b9d3 100644 (file)
@@ -2456,8 +2456,8 @@ static int setup_password_fields(struct setup_password_fields_io *io)
 {
        struct ldb_context *ldb = ldb_module_get_ctx(io->ac->module);
        struct loadparm_context *lp_ctx =
-               lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
-                                        struct loadparm_context);
+               talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
+                               struct loadparm_context);
        int ret;
 
        ret = setup_last_set_field(io);
@@ -2708,8 +2708,8 @@ static int check_password_restrictions(struct setup_password_fields_io *io, WERR
        struct ldb_context *ldb = ldb_module_get_ctx(io->ac->module);
        int ret;
        struct loadparm_context *lp_ctx =
-               lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
-                                        struct loadparm_context);
+               talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
+                               struct loadparm_context);
 
        *werror = WERR_INVALID_PARAMETER;