mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 22:21:45 +00:00
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:
committed by
Zbigniew Jędrzejewski-Szmek
parent
8096b65166
commit
dbf388481a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user