diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-26 13:48:57 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-26 14:43:24 +0100 |
commit | 4850d39ab72e7cb00a6e9c9aa4745c997674efa6 (patch) | |
tree | d2fb7c6736289a78c3b7170ccdb659360745f3f5 /src/journal/journal-send.c | |
parent | d6f4302b66fb8847dd79cdf7ea35b9eeccac8aff (diff) |
journald: add a couple of static asserts checking logging constants
Whenever we include a log level or facility in a journal string field, make sure the compiler checks for us that that's
actually the right thing to do.
Diffstat (limited to 'src/journal/journal-send.c')
-rw-r--r-- | src/journal/journal-send.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c index 44fa11a00e..def4caab92 100644 --- a/src/journal/journal-send.c +++ b/src/journal/journal-send.c @@ -372,6 +372,7 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove xsprintf(error, "ERRNO=%i", _saved_errno_); + assert_cc(3 == LOG_ERR); IOVEC_SET_STRING(iov[skip+0], "PRIORITY=3"); IOVEC_SET_STRING(iov[skip+1], buffer); IOVEC_SET_STRING(iov[skip+2], error); |