systemd/1248-time-util-use-DEFINE_STRING_TABLE_LOOKUP_TO_STRING-m.patch
Jan Macku 2169d2c18c systemd-252-57
Resolves: RHEL-108555,RHEL-108568,RHEL-108576,RHEL-108584,RHEL-108596,RHEL-108598,RHEL-109096,RHEL-109488,RHEL-111065,RHEL-31756,RHEL-50103
2025-09-16 08:59:46 +02:00

26 lines
1.0 KiB
Diff

From c5bdf8c148fc9ab18d3412756ada7317caece6fe Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Tue, 14 Feb 2023 01:40:56 +0900
Subject: [PATCH] time-util: use DEFINE_STRING_TABLE_LOOKUP_TO_STRING() macro
(cherry picked from commit d227a42aadf04c23c668ac3089bc7b4a9baaf7e1)
Related: RHEL-109488
---
src/basic/time-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index f5e10bba1a..6eee8a48a7 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1616,7 +1616,7 @@ static const char* const timestamp_style_table[_TIMESTAMP_STYLE_MAX] = {
};
/* Use the macro for enum → string to allow for aliases */
-_DEFINE_STRING_TABLE_LOOKUP_TO_STRING(timestamp_style, TimestampStyle,);
+DEFINE_STRING_TABLE_LOOKUP_TO_STRING(timestamp_style, TimestampStyle);
/* For the string → enum mapping we use the generic implementation, but also support two aliases */
TimestampStyle timestamp_style_from_string(const char *s) {