From c9c1a41c581101f53cc36efae53cd8ebb568962f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 12 Jul 2006 19:17:55 +0000 Subject: A couple things that got tangled up in my tree, easier to check in both than untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree. --- networking/netstat.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'networking/netstat.c') diff --git a/networking/netstat.c b/networking/netstat.c index 4faa40cd4..6d91bb3f4 100644 --- a/networking/netstat.c +++ b/networking/netstat.c @@ -11,18 +11,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "inet_common.h" #include "busybox.h" -#include "pwd_.h" +#include "inet_common.h" #ifdef CONFIG_ROUTE extern void displayroutes(int noresolve, int netstatfmt); @@ -87,19 +77,6 @@ typedef enum { #define SO_WAITDATA (1<<17) /* wait data to read */ #define SO_NOSPACE (1<<18) /* no space to write */ -static char *itoa(unsigned int i) -{ - /* 21 digits plus null terminator, good for 64-bit or smaller ints */ - static char local[22]; - char *p = &local[21]; - *p-- = '\0'; - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - return p + 1; -} - static char *get_sname(int port, const char *proto, int num) { char *str=itoa(ntohs(port)); -- cgit v1.2.3