audit: minimize our use of audit_log_format()

There are some cases where we are making multiple audit_log_format()
calls in a row, for no apparent reason.  Squash these down to a
single audit_log_format() call whenever possible.

Acked-by: Richard Guy Briggs <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
Paul Moore 2018-08-02 17:56:50 -04:00
commit d0a3f18a70
5 changed files with 11 additions and 16 deletions

View file

@ -2503,10 +2503,9 @@ void audit_seccomp_actions_logged(const char *names, const char *old_names,
if (unlikely(!ab))
return;
audit_log_format(ab, "op=seccomp-logging");
audit_log_format(ab, " actions=%s", names);
audit_log_format(ab, " old-actions=%s", old_names);
audit_log_format(ab, " res=%d", res);
audit_log_format(ab,
"op=seccomp-logging actions=%s old-actions=%s res=%d",
names, old_names, res);
audit_log_end(ab);
}