man/sd_journal_next: fix argument in example

The example does not compile, it fails with:

error: passing argument 3 of ‘sd_journal_get_data’ from incompatible
pointer type

Cast to (const void **) to avoid this.
This commit is contained in:
Christian Hesse 2014-07-01 10:22:50 +02:00 committed by Lennart Poettering
parent 793c098f0a
commit 8959ae0d4c

View file

@ -183,7 +183,7 @@ int main(int argc, char *argv[]) {
const char *d;
size_t l;
r = sd_journal_get_data(j, "MESSAGE", &d, &l);
r = sd_journal_get_data(j, "MESSAGE", (const void **)&d, &l);
if (r < 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;