]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logs-show: comment out dead code
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Mar 2025 01:51:35 +0000 (10:51 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Mar 2025 02:41:12 +0000 (11:41 +0900)
Follow-up for 280e85224e6273f1835a41782f2e3abd7582dd2e.
Fixes CID#1548921 and CID#1548922.

src/shared/logs-show.c

index cc66503819fe70bfc7b01cd87abd6e441a8ee738..664bffbc7158dbb0167ab9eadacbf7542606aedc 100644 (file)
@@ -458,14 +458,11 @@ static void parse_display_realtime(
                 const char *source_monotonic,
                 usec_t *ret) {
 
-        usec_t t, s, u;
+        usec_t t;
 
         assert(j);
         assert(ret);
 
-        // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime.
-        source_monotonic = NULL;
-
         /* First, try _SOURCE_REALTIME_TIMESTAMP. */
         if (source_realtime && safe_atou64(source_realtime, &t) >= 0 && VALID_REALTIME(t)) {
                 *ret = t;
@@ -479,11 +476,15 @@ static void parse_display_realtime(
         }
 
         /* If _SOURCE_MONOTONIC_TIMESTAMP is provided, adjust the header timestamp. */
+        // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime.
+        /*
+        usec_t s, u;
         if (source_monotonic && safe_atou64(source_monotonic, &s) >= 0 && VALID_MONOTONIC(s) &&
             sd_journal_get_monotonic_usec(j, &u, &(sd_id128_t) {}) >= 0) {
                 *ret = map_clock_usec_raw(t, u, s);
                 return;
         }
+        */
 
         /* Otherwise, use the header timestamp as is. */
         *ret = t;
@@ -504,14 +505,14 @@ static void parse_display_timestamp(
         assert(ret_display_ts);
         assert(ret_boot_id);
 
-        // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime.
-        source_monotonic = NULL;
-
         if (source_realtime && safe_atou64(source_realtime, &t) >= 0 && VALID_REALTIME(t))
                 source_ts.realtime = t;
 
+        // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime.
+        /*
         if (source_monotonic && safe_atou64(source_monotonic, &t) >= 0 && VALID_MONOTONIC(t))
                 source_ts.monotonic = t;
+        */
 
         (void) sd_journal_get_realtime_usec(j, &header_ts.realtime);
         (void) sd_journal_get_monotonic_usec(j, &header_ts.monotonic, &boot_id);