time-util: Rename and fix call of deserialize_timestamp_value()
authorKunhoon Baik <knhoon.baik@samsung.com>
Fri, 26 Aug 2016 02:08:21 +0000 (11:08 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 26 Jan 2024 16:49:49 +0000 (17:49 +0100)
The deserialize_timestamp_value() is renamed timestamp_deserialize() to be more
consistent with dual_timestamp_deserialize()
And add the NULL check back on realtime and monotonic

Change-Id: I77d047981d87332424b20241a8f0514ba400ecb0
Origin: https://github.com/systemd/systemd/commit/b895a7353b

src/basic/time-util.c

index d133ee2..81a5314 100644 (file)
@@ -518,15 +518,14 @@ int timestamp_deserialize(const char *value, usec_t *timestamp) {
         return r;
 }
 
-int deserialize_timestamp_value(const char *value, usec_t *timestamp) {
+int timestamp_deserialize(const char *value, usec_t *timestamp) {
         int r;
 
         assert(value);
 
         r = safe_atou64(value, timestamp);
-
         if (r < 0)
-                return log_debug_errno(r, "Failed to parse finish timestamp value \"%s\": %m", value);
+                return log_debug_errno(r, "Failed to parse timestamp value \"%s\": %m", value);
 
         return r;
 }