blob: e730fe1cd0fecc887c571944e8987016c9b1c55e [file] [log] [blame]
Andrew Geissler615f2f12022-07-15 14:00:58 -05001From d23c0ea81e630af3cfda89aeeb52146c0c84c960 Mon Sep 17 00:00:00 2001
2From: Tobias Brunner <tobias@strongswan.org>
3Date: Mon, 2 May 2022 09:31:49 +0200
4Subject: [PATCH] enum: Fix compiler warning
5
6Closes strongswan/strongswan#1025
7
8Upstream-Status: Backport
9[https://github.com/strongswan/strongswan/commit/d23c0ea81e630af3cfda89aeeb52146c0c84c960]
10
11Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
12---
13 src/libstrongswan/utils/enum.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/libstrongswan/utils/enum.c b/src/libstrongswan/utils/enum.c
17index 79da450f0c..1e77489f6f 100644
18--- a/src/libstrongswan/utils/enum.c
19+++ b/src/libstrongswan/utils/enum.c
20@@ -97,7 +97,7 @@ char *enum_flags_to_string(enum_name_t *e, u_int val, char *buf, size_t len)
21 return buf;
22 }
23
24- if (snprintf(buf, len, e->names[0]) >= len)
25+ if (snprintf(buf, len, "%s", e->names[0]) >= len)
26 {
27 return NULL;
28 }
29--
302.25.1
31