Author: tjansen Date: Wed Oct 28 12:27:19 2009 New Revision: 1365 Log: Removed unused functions dubIp{4,6}SocketAddress. Modified: trunk/include/util.h trunk/libpisa/util.c Modified: trunk/include/util.h ============================================================================== --- trunk/include/util.h Wed Oct 28 12:19:57 2009 (r1364) +++ trunk/include/util.h Wed Oct 28 12:27:19 2009 (r1365) @@ -121,9 +121,6 @@ void die(const char *errorText,int exitValue); void usage(const char *text); -struct sockaddr_in* dubIp4SocketAddress(const struct sockaddr_in* addr); -struct sockaddr_in6* dubIp6SocketAddress(const struct sockaddr_in6* addr); - int pisa_maxInt(const int a,const int b); int pisa_maxof(int num_args, ...); Modified: trunk/libpisa/util.c ============================================================================== --- trunk/libpisa/util.c Wed Oct 28 12:19:57 2009 (r1364) +++ trunk/libpisa/util.c Wed Oct 28 12:27:19 2009 (r1365) @@ -53,43 +53,6 @@ } /** - * Duplicate a given ip v4 socket address struct. New memory is - * allocated and the returned struct should be freed with a - * call to free(3) - * @param addr pointer to the socket address to be duplicated - * @return the duplicated socket address. Don't forget to free(3) it! - */ -struct sockaddr_in* dubIp4SocketAddress(const struct sockaddr_in* addr) -{ - struct sockaddr_in* ret=NULL; - - ret=calloc(sizeof(struct sockaddr_in),1); - assert(ret!=NULL); - memcpy((void*)ret,(const void*)addr,sizeof(struct sockaddr_in)); - - return ret; -} - -/** - * Duplicate a given ip v6 socket address struct. New memory is - * allocated and the returned struct should be freed with a - * call to free(3) - * @param addr pointer to the socket address to be duplicated - * @return the duplicated socket address. Don't forget to free(3) it! - */ - -struct sockaddr_in6* dubIp6SocketAddress(const struct sockaddr_in6* addr) -{ - struct sockaddr_in6* ret=NULL; - - ret=calloc(sizeof(struct sockaddr_in6),1); - assert(ret!=NULL); - memcpy((void*)ret,(const void*)addr,sizeof(struct sockaddr_in6)); - - return ret; -} - -/** * Return the maximum value of the given two integer values. * * @param a the first input value