Make sure first argument is an int when using %.*s to print e.g. chunks
[strongswan.git] / src / conftest / conftest.c
index 00decdd..6491fd2 100644 (file)
@@ -289,7 +289,8 @@ static bool load_hooks()
                pos = strchr(name, '-');
                if (pos)
                {
-                       snprintf(buf, sizeof(buf), "%.*s_hook_create", pos - name, name);
+                       snprintf(buf, sizeof(buf), "%.*s_hook_create", (int)(pos - name),
+                                        name);
                }
                else
                {