Skip to content

Commit 13aed23

Browse files
lib/audit_help.c: Don't else after return
Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 4ce54e2 commit 13aed23

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

lib/audit_help.c

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ void audit_logger (int type, MAYBE_UNUSED const char *pgname, const char *op,
6666
const char *name, unsigned int id,
6767
shadow_audit_result result)
6868
{
69-
if (audit_fd < 0) {
69+
if (audit_fd < 0)
7070
return;
71-
} else {
72-
audit_log_acct_message (audit_fd, type, NULL, op, name, id,
73-
NULL, NULL, NULL, result);
74-
}
71+
72+
audit_log_acct_message(audit_fd, type, NULL, op, name, id,
73+
NULL, NULL, NULL, result);
7574
}
7675

7776
/*
@@ -109,20 +108,18 @@ audit_logger_with_group(int type, const char *op, const char *name,
109108

110109
void audit_logger_message (const char *message, shadow_audit_result result)
111110
{
112-
if (audit_fd < 0) {
111+
if (audit_fd < 0)
113112
return;
114-
} else {
115-
audit_log_user_message (audit_fd,
116-
AUDIT_USYS_CONFIG,
117-
message,
118-
NULL, /* hostname */
119-
NULL, /* addr */
120-
NULL, /* tty */
121-
result);
122-
}
113+
114+
audit_log_user_message (audit_fd,
115+
AUDIT_USYS_CONFIG,
116+
message,
117+
NULL, /* hostname */
118+
NULL, /* addr */
119+
NULL, /* tty */
120+
result);
123121
}
124122

125123
#else /* WITH_AUDIT */
126124
extern int ISO_C_forbids_an_empty_translation_unit;
127125
#endif /* WITH_AUDIT */
128-

0 commit comments

Comments
 (0)