dsdb: Use GUID_zero() rather than memset in dsdb audit code
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Jun 2018 04:46:29 +0000 (16:46 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 26 Jun 2018 01:27:20 +0000 (03:27 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/audit_log.c

index 246723e3bdf1cf40f6ffd6f2e7d856d605906c1e..581f2f235ebc935f875d4075640ffdf4b5cf0bef 100644 (file)
@@ -1464,7 +1464,7 @@ static int log_end_transaction(struct ldb_module *module)
        /*
         * Clear the transaction id inserted by log_start_transaction
         */
-       memset(&audit_private->transaction_guid, 0, sizeof(struct GUID));
+       audit_private->transaction_guid = GUID_zero();
        return ret;
 }
 
@@ -1485,7 +1485,7 @@ static int log_del_transaction(struct ldb_module *module)
                                      struct audit_private);
 
        log_transaction(module, "rollback", TRANSACTION_LOG_FAILURE_LVL);
-       memset(&audit_private->transaction_guid, 0, sizeof(struct GUID));
+       audit_private->transaction_guid = GUID_zero();
        return ldb_next_del_trans(module);
 }