]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: always initialize global variables
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 May 2023 00:39:50 +0000 (09:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 28 May 2023 05:52:32 +0000 (14:52 +0900)
That's not necessary, as they are initialized with zero, but for safety
and readability.

src/journal/journalctl.c

index c53f2d5847a239d9da659e8a519c4872553625ec..d5172a38422c823a89c3943cbf2afdb6c4f1b6bd 100644 (file)
@@ -115,7 +115,7 @@ static char *arg_verify_key = NULL;
 static usec_t arg_interval = DEFAULT_FSS_INTERVAL_USEC;
 static bool arg_force = false;
 #endif
-static usec_t arg_since, arg_until;
+static usec_t arg_since = 0, arg_until = 0;
 static bool arg_since_set = false, arg_until_set = false;
 static char **arg_syslog_identifier = NULL;
 static char **arg_system_units = NULL;