Code

src/liboping.c: Fix a compiler warning
authorFlorian Forster <octo@verplant.org>
Mon, 7 Mar 2011 08:12:06 +0000 (09:12 +0100)
committerFlorian Forster <octo@verplant.org>
Mon, 7 Mar 2011 08:12:06 +0000 (09:12 +0100)
… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.

src/liboping.c

index beef4f56cd0a2e726b2d4288f5583c63476388df..83ca9c242c072cb61622ede4c0058d51c9036f69 100644 (file)
@@ -1429,7 +1429,7 @@ int ping_host_add (pingobj_t *obj, const char *host)
                        snprintf (errmsg, PING_ERRMSG_LEN, "Unknown `ai_family': %i", ai_ptr->ai_family);
                        errmsg[PING_ERRMSG_LEN - 1] = '\0';
 
-                       dprintf (errmsg);
+                       dprintf ("%s", errmsg);
                        ping_set_error (obj, "getaddrinfo", errmsg);
                        continue;
                }