1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

journalctl: Use constants for _BOOT_ID= matches

This commit is contained in:
Jan Janssen 2021-08-20 19:34:22 +02:00 committed by Lennart Poettering
parent 72fba0c4e5
commit 492f148f1f

View File

@ -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;