summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-25 21:34:10 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-25 21:43:44 +0100
commit29abad107f8610e73b2fc091216040b579c75453 (patch)
tree4eb62b9e179a79c45d73788858da9d0551262801 /src/journal
parent8a3a1704c7738a49385e1e1a2a5041f50e79f57e (diff)
journal: fix warning about pointer arithmetic
../src/journal/journal-send.c: In function 'sd_journal_sendv': ../src/journal/journal-send.c:250:73: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-send.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index bd8f8872c9..d5ec73e371 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
@@ -246,8 +246,9 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
goto finish;
}
- have_syslog_identifier =
- have_syslog_identifier || (c == iov[i].iov_base + 17 && memcmp(iov[i].iov_base, "SYSLOG_IDENTIFIER", 17) == 0);
+ have_syslog_identifier = have_syslog_identifier ||
+ (c == (char *) iov[i].iov_base + 17 &&
+ memcmp(iov[i].iov_base, "SYSLOG_IDENTIFIER", 17) == 0);
nl = memchr(iov[i].iov_base, '\n', iov[i].iov_len);
if (nl) {