]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
net.c: Remove unused local_name().
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 1 Jan 2015 18:19:13 +0000 (18:19 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 12 Jan 2015 22:29:07 +0000 (23:29 +0100)
Found by cppcheck.

net.c
net.h

diff --git a/net.c b/net.c
index 05d8f5ca9af750263ecd28a15f73e7e0caa0ff0d..aa5615fbe9c8df16ebc9175a43981928807a3e80 100644 (file)
--- 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.
  *
  * \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)
 {
  */
 char *remote_name(int sockfd)
 {
diff --git a/net.h b/net.h
index c3dff7d830daa7dd023e57b21f5b3c6965891865..85ba8d6e4b8c3c0dc9e3cd62e16c2796d9ce0b3f 100644 (file)
--- 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 */
 }
 
 /** Pretty-printing of IPv4/6 socket addresses */
-extern char *local_name(int sockfd);
 extern char *remote_name(int sockfd);
 
 /**
 extern char *remote_name(int sockfd);
 
 /**