[systemd-commits] src/journal

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sun Nov 25 12:46:41 PST 2012


 src/journal/journal-send.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 29abad107f8610e73b2fc091216040b579c75453
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sun Nov 25 21:34:10 2012 +0100

    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]

diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index bd8f887..d5ec73e 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) {



More information about the systemd-commits mailing list