[systemd-commits] 2 commits - man/sd_journal_get_data.xml man/sd_journal_next.xml
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Jul 1 07:39:32 PDT 2014
man/sd_journal_get_data.xml | 2 +-
man/sd_journal_next.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 02ea24ca2a0aac854c4e9e7d712f6464c8b29e4a
Author: Christian Hesse <mail at eworm.de>
Date: Tue Jul 1 10:22:51 2014 +0200
man/sd_journal_get_data: fix variable naming in example
diff --git a/man/sd_journal_get_data.xml b/man/sd_journal_get_data.xml
index 343b680..1222939 100644
--- a/man/sd_journal_get_data.xml
+++ b/man/sd_journal_get_data.xml
@@ -225,7 +225,7 @@
<programlisting>...
int print_fields(sd_journal *j) {
const void *data;
- size_t l;
+ size_t length;
SD_JOURNAL_FOREACH_DATA(j, data, length)
printf("%.*s\n", (int) length, data);
}
commit 8959ae0d4cc7921293a21182693b7d953f6cce9b
Author: Christian Hesse <mail at eworm.de>
Date: Tue Jul 1 10:22:50 2014 +0200
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.
diff --git a/man/sd_journal_next.xml b/man/sd_journal_next.xml
index 0216d6e..5e691a1 100644
--- a/man/sd_journal_next.xml
+++ b/man/sd_journal_next.xml
@@ -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;
More information about the systemd-commits
mailing list