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.

(cherry picked from commit 8959ae0d4c)
This commit is contained in:
Christian Hesse
2014-07-19 17:24:13 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 8096b65166
commit dbf388481a
+1 -1
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;