From de0da85d41b207b850aa0f68bb2436525389cf2b Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 4 Feb 2026 19:32:51 +0100 Subject: [PATCH] boot/efi-string: use QUOTES macro, shorten the code a bit Follow-up for a8f2f5d71786c2cf36e32f856cc329413a76cd93 --- src/boot/efi-string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot/efi-string.c b/src/boot/efi-string.c index ca077a5096f..ee430c1b36a 100644 --- a/src/boot/efi-string.c +++ b/src/boot/efi-string.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "efi-string.h" +#include "string-util-fundamental.h" #if SD_BOOT # include "proto/simple-text-io.h" @@ -497,8 +498,7 @@ char* line_get_key_value(char *s, const char *sep, size_t *pos, char **ret_key, value++; /* unquote */ - if ((value[0] == '"' && line[linelen - 1] == '"') || - (value[0] == '\'' && line[linelen - 1] == '\'')) { + if (strchr8(QUOTES, value[0]) && line[linelen - 1] == value[0]) { value++; line[linelen - 1] = '\0'; } -- 2.47.3