]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-journal: rename sd_journal_get_monotonic_usec ret argument
authorJelle van der Waa <jvanderwaa@redhat.com>
Sun, 25 May 2025 17:53:24 +0000 (19:53 +0200)
committerJelle van der Waa <jvanderwaa@redhat.com>
Mon, 2 Jun 2025 15:39:44 +0000 (17:39 +0200)
Rename ret to ret_monotonic to distinguish from ret_boot_id and
according to existing argument comments.

src/libsystemd/sd-journal/sd-journal.c
src/systemd/sd-journal.h

index 8ec1fe450c36d0a9fb79e356870090b4b32938f3..840f6d684b44cd9edd48b9bb36699dcbaeda16e9 100644 (file)
@@ -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;
 
index ec1568904e57e07bd496d7165ab29c6e2011a0c2..57dc8a8332758e0a2982dcbdaf27d92caa532d1d 100644 (file)
@@ -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);