From 2bfa3185aa2df9a5c576dac78566ad8489873b28 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sun, 25 May 2025 19:53:24 +0200 Subject: [PATCH] sd-journal: rename sd_journal_get_monotonic_usec ret argument Rename ret to ret_monotonic to distinguish from ret_boot_id and according to existing argument comments. --- src/libsystemd/sd-journal/sd-journal.c | 6 +++--- src/systemd/sd-journal.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index 8ec1fe450c..840f6d684b 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -2706,7 +2706,7 @@ _public_ int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret) { return 0; } -_public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t *ret_boot_id) { +_public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret_monotonic, sd_id128_t *ret_boot_id) { JournalFile *f; Object *o; int r; @@ -2739,8 +2739,8 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12 if (!VALID_MONOTONIC(t)) return -EBADMSG; - if (ret) - *ret = t; + if (ret_monotonic) + *ret_monotonic = t; if (ret_boot_id) *ret_boot_id = o->entry.boot_id; diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h index ec1568904e..57dc8a8332 100644 --- a/src/systemd/sd-journal.h +++ b/src/systemd/sd-journal.h @@ -98,7 +98,7 @@ int sd_journal_previous_skip(sd_journal *j, uint64_t skip); int sd_journal_next_skip(sd_journal *j, uint64_t skip); int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret); -int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t *ret_boot_id); +int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret_monotonic, sd_id128_t *ret_boot_id); int sd_journal_get_seqnum(sd_journal *j, uint64_t *ret_seqnum, sd_id128_t *ret_seqnum_id); int sd_journal_set_data_threshold(sd_journal *j, size_t sz);