chiark / gitweb /
journalctl: add a marker to log output for reboots
[elogind.git] / src / journal / sd-journal.c
index 6331f042cef865d65b58cd91283fa10e4692792f..5420be13ea0a6acbe95ac20f668f8550713caa7f 100644 (file)
@@ -1397,8 +1397,6 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12
 
         if (!j)
                 return -EINVAL;
-        if (!ret)
-                return -EINVAL;
 
         f = j->current_file;
         if (!f)
@@ -1422,7 +1420,9 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12
                         return -ESTALE;
         }
 
-        *ret = le64toh(o->entry.monotonic);
+        if (ret)
+                *ret = le64toh(o->entry.monotonic);
+
         return 0;
 }