diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-14 19:02:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 19:02:29 +0100 |
commit | fbd0b64f44a7bae678137d67ad5da202f6b8d809 (patch) | |
tree | 0402dca4e258583e009d07c0d8eb9c0fad19d5ac /src/journal/journal-send.c | |
parent | 1142cbd76a1db2adb2c382b76fc0a1c5a97c70cc (diff) | |
download | systemd-fbd0b64f44a7bae678137d67ad5da202f6b8d809.tar.gz |
tree-wide: make use of new STRLEN() macro everywhere (#7639)
Let's employ coccinelle to do this for us.
Follow-up for #7625.
Diffstat (limited to 'src/journal/journal-send.c')
-rw-r--r-- | src/journal/journal-send.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c index 5bca471c98..a78aa07032 100644 --- a/src/journal/journal-send.c +++ b/src/journal/journal-send.c @@ -96,7 +96,7 @@ _public_ int sd_journal_printv(int priority, const char *format, va_list ap) { /* FIXME: Instead of limiting things to LINE_MAX we could do a C99 variable-length array on the stack here in a loop. */ - char buffer[8 + LINE_MAX], p[sizeof("PRIORITY=")-1 + DECIMAL_STR_MAX(int) + 1]; + char buffer[8 + LINE_MAX], p[STRLEN("PRIORITY=") + DECIMAL_STR_MAX(int) + 1]; struct iovec iov[2]; assert_return(priority >= 0, -EINVAL); @@ -357,7 +357,7 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove errno = 0; j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); if (errno == 0) { - char error[sizeof("ERRNO=")-1 + DECIMAL_STR_MAX(int) + 1]; + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; if (j != buffer + 8 + k) memmove(buffer + 8 + k, j, strlen(j)+1); @@ -459,7 +459,7 @@ _public_ int sd_journal_print_with_location(int priority, const char *file, cons } _public_ int sd_journal_printv_with_location(int priority, const char *file, const char *line, const char *func, const char *format, va_list ap) { - char buffer[8 + LINE_MAX], p[sizeof("PRIORITY=")-1 + DECIMAL_STR_MAX(int) + 1]; + char buffer[8 + LINE_MAX], p[STRLEN("PRIORITY=") + DECIMAL_STR_MAX(int) + 1]; struct iovec iov[5]; char *f; |