s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()
[metze/samba/wip.git] / source4 / dns_server / dns_update.c
index a82303b424b0ed6646f483cbaac837594e80d64f..0906c2aaff72433a13e54ac7af33dd47a53ad991 100644 (file)
@@ -518,7 +518,9 @@ static WERROR handle_one_update(struct dns_server *dns,
                                        continue;
                                }
 
-                               ZERO_STRUCT(recs[i]);
+                               recs[i] = (struct dnsp_DnssrvRpcRecord) {
+                                       .wType = DNS_TYPE_TOMBSTONE,
+                               };
                        }
 
                        werror = dns_replace_records(dns, mem_ctx, dn,
@@ -567,12 +569,16 @@ static WERROR handle_one_update(struct dns_server *dns,
                                                continue;
                                        }
 
-                                       ZERO_STRUCT(recs[i]);
+                                       recs[i] = (struct dnsp_DnssrvRpcRecord) {
+                                               .wType = DNS_TYPE_TOMBSTONE,
+                                       };
                                }
 
                        } else {
                                for (i = 0; i < rcount; i++) {
-                                       ZERO_STRUCT(recs[i]);
+                                       recs[i] = (struct dnsp_DnssrvRpcRecord) {
+                                               .wType = DNS_TYPE_TOMBSTONE,
+                                       };
                                }
                        }
 
@@ -588,7 +594,9 @@ static WERROR handle_one_update(struct dns_server *dns,
                }
                for (i = 0; i < rcount; i++) {
                        if (recs[i].wType == update->rr_type) {
-                               ZERO_STRUCT(recs[i]);
+                               recs[i] = (struct dnsp_DnssrvRpcRecord) {
+                                       .wType = DNS_TYPE_TOMBSTONE,
+                               };
                        }
                }
 
@@ -632,7 +640,9 @@ static WERROR handle_one_update(struct dns_server *dns,
 
                for (i = 0; i < rcount; i++) {
                        if (dns_records_match(del_rec, &recs[i])) {
-                               ZERO_STRUCT(recs[i]);
+                               recs[i] = (struct dnsp_DnssrvRpcRecord) {
+                                       .wType = DNS_TYPE_TOMBSTONE,
+                               };
                        }
                }