aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-01 16:45:03 +0200
committerMax Kellermann <max@duempel.org>2009-04-01 16:45:03 +0200
commita96bec36557e849f6a807ea2d66f4878298bac6d (patch)
tree9e8c01a1ee71156910985305a1793695a69811a3 /src
parent6419cc54ac200b217d99ee35d1e2d57dbfda3f55 (diff)
downloadmpd-a96bec36557e849f6a807ea2d66f4878298bac6d.tar.gz
mpd-a96bec36557e849f6a807ea2d66f4878298bac6d.tar.xz
mpd-a96bec36557e849f6a807ea2d66f4878298bac6d.zip
socket_util: fixed format warning
g_set_error() is a printf-like function, and expects a format string. Using the return value of gai_strerror() is unsafe.
Diffstat (limited to 'src')
-rw-r--r--src/socket_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket_util.c b/src/socket_util.c
index 9485ae1e7..da4e414b6 100644
--- a/src/socket_util.c
+++ b/src/socket_util.c
@@ -71,7 +71,7 @@ sockaddr_to_string(const struct sockaddr *sa, size_t length, GError **error)
NI_NUMERICHOST|NI_NUMERICSERV);
if (ret != 0) {
g_set_error(error, g_quark_from_static_string("netdb"), ret,
- gai_strerror(ret));
+ "%s", gai_strerror(ret));
return NULL;
}