From d18bae916981a73cdad1103b866a9afabd9e0519 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 25 Jun 2018 16:46:29 +1200 Subject: [PATCH] dsdb: Use GUID_zero() rather than memset in dsdb audit code Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- source4/dsdb/samdb/ldb_modules/audit_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/audit_log.c b/source4/dsdb/samdb/ldb_modules/audit_log.c index 246723e3bdf..581f2f235eb 100644 --- a/source4/dsdb/samdb/ldb_modules/audit_log.c +++ b/source4/dsdb/samdb/ldb_modules/audit_log.c @@ -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); }