aboutsummaryrefslogtreecommitdiffstats
path: root/src/system/Resolver.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-04 08:43:55 +0100
committerMax Kellermann <max@duempel.org>2013-12-04 08:43:55 +0100
commite1901e97c2f3f6901ca7bac31a68ac9da1e3a4ee (patch)
treefac9794063e63a6e3e870a6455f13df54ef146fe /src/system/Resolver.hxx
parentd694150372408cd80b89a2e27a88f91b5f856b67 (diff)
downloadmpd-e1901e97c2f3f6901ca7bac31a68ac9da1e3a4ee.tar.gz
mpd-e1901e97c2f3f6901ca7bac31a68ac9da1e3a4ee.tar.xz
mpd-e1901e97c2f3f6901ca7bac31a68ac9da1e3a4ee.zip
system/Resolver: sockaddr_to_string() returns std::string()
No GLib memory allocation.
Diffstat (limited to 'src/system/Resolver.hxx')
-rw-r--r--src/system/Resolver.hxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/system/Resolver.hxx b/src/system/Resolver.hxx
index ec557d1a0..044d3f96a 100644
--- a/src/system/Resolver.hxx
+++ b/src/system/Resolver.hxx
@@ -22,6 +22,8 @@
#include "Compiler.h"
+#include <string>
+
#include <stddef.h>
struct sockaddr;
@@ -33,17 +35,14 @@ extern const Domain resolver_domain;
/**
* Converts the specified socket address into a string in the form
- * "IP:PORT". The return value must be freed with g_free() when you
- * don't need it anymore.
+ * "IP:PORT".
*
* @param sa the sockaddr struct
* @param length the length of #sa in bytes
- * @param error location to store the error occurring, or NULL to
- * ignore errors
*/
-gcc_malloc
-char *
-sockaddr_to_string(const sockaddr *sa, size_t length, Error &error);
+gcc_pure
+std::string
+sockaddr_to_string(const sockaddr *sa, size_t length);
/**
* Resolve a specification in the form "host", "host:port",