summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2021-08-20 19:34:22 +0200
committerLennart Poettering <lennart@poettering.net>2021-08-20 21:40:35 +0200
commit492f148f1fe775b6e6014acaf8fc41f2f1aadfea (patch)
treecbeb5c663a770148f5e4419e2fec0b4b98deb0c4 /src/journal/journalctl.c
parent72fba0c4e5cd159259010b71a1c1bb72393251c8 (diff)
downloadsystemd-492f148f1fe775b6e6014acaf8fc41f2f1aadfea.tar.gz
journalctl: Use constants for _BOOT_ID= matches
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 15c72d5d35..b1786c7954 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1227,7 +1227,7 @@ static int discover_next_boot(sd_journal *j,
BootId **ret) {
_cleanup_free_ BootId *next_boot = NULL;
- char match[9+32+1] = "_BOOT_ID=";
+ char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
sd_id128_t boot_id;
int r;
@@ -1336,7 +1336,7 @@ static int get_boots(
* If no reference is given, the journal head/tail will do,
* they're "virtual" boots after all. */
if (boot_id && !sd_id128_is_null(*boot_id)) {
- char match[9+32+1] = "_BOOT_ID=";
+ char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
sd_journal_flush_matches(j);
@@ -1467,7 +1467,7 @@ static int list_boots(sd_journal *j) {
}
static int add_boot(sd_journal *j) {
- char match[9+32+1] = "_BOOT_ID=";
+ char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
sd_id128_t boot_id;
int r;