chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: fix operation precedence mix-up
[elogind.git]
/
src
/
journal
/
journal-send.c
diff --git
a/src/journal/journal-send.c
b/src/journal/journal-send.c
index 4c9753cec1ad6ac6ff8441cc5eab346650e9865c..bc44828e1c0e0ea724d496d397d6fa6f5928e178 100644
(file)
--- a/
src/journal/journal-send.c
+++ b/
src/journal/journal-send.c
@@
-97,7
+97,7
@@
_public_ int sd_journal_printv(int priority, const char *format, va_list ap) {
}
static int fill_iovec_sprintf(const char *format, va_list ap, int extra, struct iovec **_iov) {
}
static int fill_iovec_sprintf(const char *format, va_list ap, int extra, struct iovec **_iov) {
- int r, n = 0, i, j;
+ int r, n = 0, i
= 0
, j;
struct iovec *iov = NULL;
int saved_errno;
struct iovec *iov = NULL;
int saved_errno;
@@
-113,8
+113,7
@@
static int fill_iovec_sprintf(const char *format, va_list ap, int extra, struct
}
i = extra;
}
i = extra;
- } else
- i = 0;
+ }
while (format) {
struct iovec *c;
while (format) {
struct iovec *c;
@@
-376,10
+375,11
@@
_public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
identifier = "";
l = strlen(identifier);
identifier = "";
l = strlen(identifier);
- header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
+ header = alloca(l + 1 +
1 +
2 + 2 + 2 + 2 + 2);
memcpy(header, identifier, l);
header[l++] = '\n';
memcpy(header, identifier, l);
header[l++] = '\n';
+ header[l++] = '\n';
header[l++] = '0' + priority;
header[l++] = '\n';
header[l++] = '0' + !!level_prefix;
header[l++] = '0' + priority;
header[l++] = '\n';
header[l++] = '0' + !!level_prefix;