chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build-sys: re-add old symbols for abi compat
[elogind.git]
/
src
/
journal
/
journald-stream.c
diff --git
a/src/journal/journald-stream.c
b/src/journal/journald-stream.c
index eabe019bfcc6f0f9214caa45933ab404cd4da24d..942a857803264322bb0bd47be9b61f9ed68556ae 100644
(file)
--- a/
src/journal/journald-stream.c
+++ b/
src/journal/journald-stream.c
@@
-223,7
+223,7
@@
static int stdout_stream_log(StdoutStream *s, const char *p) {
struct iovec iovec[N_IOVEC_META_FIELDS + 5];
int priority;
char syslog_priority[] = "PRIORITY=\0";
struct iovec iovec[N_IOVEC_META_FIELDS + 5];
int priority;
char syslog_priority[] = "PRIORITY=\0";
- char syslog_facility[sizeof("SYSLOG_FACILITY=")
+ DECIMAL_STR_MAX(priority)
];
+ char syslog_facility[sizeof("SYSLOG_FACILITY=")
-1 + DECIMAL_STR_MAX(int) + 1
];
_cleanup_free_ char *message = NULL, *syslog_identifier = NULL;
unsigned n = 0;
char *label = NULL;
_cleanup_free_ char *message = NULL, *syslog_identifier = NULL;
unsigned n = 0;
char *label = NULL;
@@
-258,7
+258,7
@@
static int stdout_stream_log(StdoutStream *s, const char *p) {
IOVEC_SET_STRING(iovec[n++], syslog_priority);
if (priority & LOG_FACMASK) {
IOVEC_SET_STRING(iovec[n++], syslog_priority);
if (priority & LOG_FACMASK) {
-
snprintf(syslog_facility, sizeof(syslog_facility)
, "SYSLOG_FACILITY=%i", LOG_FAC(priority));
+
xsprintf(syslog_facility
, "SYSLOG_FACILITY=%i", LOG_FAC(priority));
IOVEC_SET_STRING(iovec[n++], syslog_facility);
}
IOVEC_SET_STRING(iovec[n++], syslog_facility);
}