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.
This commit is contained in:
Max Kellermann 2009-04-01 16:45:03 +02:00
parent 6419cc54ac
commit a96bec3655

View File

@ -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;
}