From cb1b1bbd7b03dc538e77dcc879d9a6fd4033cf71 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 4 Nov 2024 14:32:39 +0000 Subject: [PATCH] libkmod: inline _idx_empty_str The compiler already creates an empty string as applicable, drop the extra variable. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/224 Signed-off-by: Lucas De Marchi --- libkmod/libkmod-index.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index e9387a6c..0c007890 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -599,8 +599,6 @@ struct index_value *index_searchwild(struct index_file *in, const char *key) #include #include -static const char _idx_empty_str[] = ""; - struct index_mm { const struct kmod_ctx *ctx; void *mm; @@ -673,7 +671,7 @@ static struct index_mm_node *index_mm_read_node(struct index_mm *idx, uint32_t o size_t len; node->prefix = read_chars_mm(&p, &len); } else { - node->prefix = _idx_empty_str; + node->prefix = ""; } if (offset & INDEX_NODE_CHILDS) { -- 2.47.2