]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
enum: Fix compiler warning
authorTobias Brunner <tobias@strongswan.org>
Mon, 2 May 2022 07:31:49 +0000 (09:31 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 2 May 2022 07:31:49 +0000 (09:31 +0200)
Closes strongswan/strongswan#1025

src/libstrongswan/utils/enum.c

index 79da450f0cee2735fe079c81f57cd72b30f3dfa2..1e77489f6fa5c54e9eb5861e92284e9089e0c895 100644 (file)
@@ -97,7 +97,7 @@ char *enum_flags_to_string(enum_name_t *e, u_int val, char *buf, size_t len)
                return buf;
        }
 
-       if (snprintf(buf, len, e->names[0]) >= len)
+       if (snprintf(buf, len, "%s", e->names[0]) >= len)
        {
                return NULL;
        }