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]
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2012-11-25 21:34:10 +01:00
parent 8a3a1704c7
commit 29abad107f
1 changed files with 3 additions and 2 deletions

View File

@ -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) {