From: Andre Noll Date: Thu, 1 Jan 2015 18:19:13 +0000 (+0000) Subject: net.c: Remove unused local_name(). X-Git-Tag: v0.5.4~23 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=300f8b11d60c651d73af3da13c74a02586a06b9c;p=paraslash.git net.c: Remove unused local_name(). Found by cppcheck. --- diff --git a/net.c b/net.c index 05d8f5ca..aa5615fb 100644 --- a/net.c +++ b/net.c @@ -664,29 +664,12 @@ static char *__get_sock_name(int fd, typeof(getsockname) getname) } /** - * Look up the local side of a connected socket structure. + * Look up the remote side of a connected socket structure. * * \param sockfd The file descriptor of the socket. * * \return A pointer to a static buffer containing hostname an port. This * buffer must not be freed by the caller. - * - * \sa remote_name(). - */ -char *local_name(int sockfd) -{ - return __get_sock_name(sockfd, getsockname); -} - -/** - * Look up the remote side of a connected socket structure. - * - * \param sockfd The file descriptor of the socket. - * - * \return Analogous to the return value of \ref local_name() but for the - * remote side. - * - * \sa local_name(). */ char *remote_name(int sockfd) { diff --git a/net.h b/net.h index c3dff7d8..85ba8d6e 100644 --- a/net.h +++ b/net.h @@ -136,7 +136,6 @@ static inline int para_listen_simple(unsigned l4type, uint16_t port) } /** Pretty-printing of IPv4/6 socket addresses */ -extern char *local_name(int sockfd); extern char *remote_name(int sockfd); /**