diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-10-08 17:02:30 +0000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-10-13 14:26:30 +0200 |
commit | 1ca6783f5ea3755bd83e723f529c2eda512c7fed (patch) | |
tree | 8c8976c5ffcd9bbaeab0d11836f0b68745f19c43 /src/journal/journald.c | |
parent | c0735bb2183493147c17a509ec8038bced5d35c9 (diff) |
log: introduce a macro to format message id
The MESSAGE_ID=... stanza will appear in countless number of places.
It is just too long to write it out in full each time.
Incidentally, this also fixes a typo of MESSSAGE is three places.
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r-- | src/journal/journald.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index 0910d7d817..4dcf7d32c2 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -725,7 +725,7 @@ void server_driver_message(Server *s, sd_id128_t message_id, const char *format, IOVEC_SET_STRING(iovec[n++], buffer); if (!sd_id128_equal(message_id, SD_ID128_NULL)) { - snprintf(mid, sizeof(mid), "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(message_id)); + snprintf(mid, sizeof(mid), MESSAGE_ID(message_id)); char_array_0(mid); IOVEC_SET_STRING(iovec[n++], mid); } |