audi: replace open-coded TDP_AUDITREC checks with the macro

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
mjg 2018-12-11 17:14:12 +00:00
parent b59887227d
commit 9be8aba618

View File

@ -389,7 +389,7 @@ void audit_thread_free(struct thread *td);
* auditing is disabled, so we don't just check audit_syscalls_enabled here.
*/
#define AUDIT_SYSCALL_EXIT(error, td) do { \
if (td->td_pflags & TDP_AUDITREC) \
if (AUDITING_TD(td)) \
audit_syscall_exit(error, td); \
} while (0)
@ -397,7 +397,7 @@ void audit_thread_free(struct thread *td);
* A Macro to wrap the audit_sysclose() function.
*/
#define AUDIT_SYSCLOSE(td, fd) do { \
if (td->td_pflags & TDP_AUDITREC) \
if (AUDITING_TD(td)) \
audit_sysclose(td, fd); \
} while (0)