diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-05-05 22:26:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-05-05 22:26:09 +0200 |
commit | 23be5709e10b3b88a9908f3005351ccba9e5d48b (patch) | |
tree | e7c94f7c73e08bb18512a05cfae46b93106c0154 | |
parent | fc2fffe7706ef269005bf4eef56570346c9ca3da (diff) |
journald: stack allocation cannot fail
No need to check whether alloca() failed...
-rw-r--r-- | src/journal/journald-syslog.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c index ead47887d8..0609b4b694 100644 --- a/src/journal/journald-syslog.c +++ b/src/journal/journald-syslog.c @@ -315,12 +315,12 @@ static void syslog_skip_date(char **buf) { } void server_process_syslog_message( - Server *s, - const char *buf, - const struct ucred *ucred, - const struct timeval *tv, - const char *label, - size_t label_len) { + Server *s, + const char *buf, + const struct ucred *ucred, + const struct timeval *tv, + const char *label, + size_t label_len) { char syslog_priority[sizeof("PRIORITY=") + DECIMAL_STR_MAX(int)], syslog_facility[sizeof("SYSLOG_FACILITY=") + DECIMAL_STR_MAX(int)]; @@ -364,14 +364,12 @@ void server_process_syslog_message( if (identifier) { syslog_identifier = strjoina("SYSLOG_IDENTIFIER=", identifier); - if (syslog_identifier) - IOVEC_SET_STRING(iovec[n++], syslog_identifier); + IOVEC_SET_STRING(iovec[n++], syslog_identifier); } if (pid) { syslog_pid = strjoina("SYSLOG_PID=", pid); - if (syslog_pid) - IOVEC_SET_STRING(iovec[n++], syslog_pid); + IOVEC_SET_STRING(iovec[n++], syslog_pid); } message = strjoina("MESSAGE=", buf); |