wrepl_server: use a local 'local_owner' variable to make the code more readable
authorStefan Metzmacher <metze@sernet.de>
Thu, 20 Mar 2008 12:26:14 +0000 (13:26 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 06:05:50 +0000 (07:05 +0100)
metze
(from samba4wins tree eba9a8ce0641a2984112f4e1473801fa449ed96d)

source4/wrepl_server/wrepl_apply_records.c

index 380b77517fc557cac8c058c195b9edd91a77ca2f..17777f4dcffc974d7e0fca083f3c03dac6560ccc 100644 (file)
@@ -1191,6 +1191,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
        size_t len;
        bool changed_old_addrs = false;
        bool become_owner = true;
        size_t len;
        bool changed_old_addrs = false;
        bool become_owner = true;
+       const char *local_owner = partner->service->wins_db->local_owner;
 
        merge = talloc(mem_ctx, struct winsdb_record);
        NT_STATUS_HAVE_NO_MEMORY(merge);
 
        merge = talloc(mem_ctx, struct winsdb_record);
        NT_STATUS_HAVE_NO_MEMORY(merge);
@@ -1265,7 +1266,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
        }
 
        /* if we're the owner of the old record, we'll be the owner of the new one too */
        }
 
        /* if we're the owner of the old record, we'll be the owner of the new one too */
-       if (strcmp(rec->wins_owner, partner->service->wins_db->local_owner)==0) {
+       if (strcmp(rec->wins_owner, local_owner)==0) {
                become_owner = true;
        }
 
                become_owner = true;
        }