summaryrefslogtreecommitdiff
path: root/networking/netstat.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-03 21:00:06 +0000
committerDenis Vlasenko2006-10-03 21:00:06 +0000
commit67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 (patch)
treeedb58560b444979051b42ab7f0c0c718f7459754 /networking/netstat.c
parent40920825d59874cf285390434486e88c8498d2d8 (diff)
downloadbusybox-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.zip
busybox-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.gz
getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
Diffstat (limited to 'networking/netstat.c')
-rw-r--r--networking/netstat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/netstat.c b/networking/netstat.c
index cadcb0e..bc5c619 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -21,7 +21,7 @@ extern void displayroutes(int noresolve, int netstatfmt);
#define NETSTAT_CONNECTED 0x01
#define NETSTAT_LISTENING 0x02
#define NETSTAT_NUMERIC 0x04
-/* Must match getopt_ulflags option string */
+/* Must match getopt32 option string */
#define NETSTAT_TCP 0x10
#define NETSTAT_UDP 0x20
#define NETSTAT_RAW 0x40
@@ -526,7 +526,7 @@ int netstat_main(int argc, char **argv)
OPT_extended = 0x4,
OPT_showroute = 0x100,
};
- unsigned long opt;
+ unsigned opt;
#ifdef CONFIG_FEATURE_IPV6
int inet = 1;
int inet6 = 1;
@@ -536,7 +536,7 @@ int netstat_main(int argc, char **argv)
#endif
/* Option string must match NETSTAT_xxx constants */
- opt = bb_getopt_ulflags(argc, argv, "laentuwxr");
+ opt = getopt32(argc, argv, "laentuwxr");
if (opt & 0x1) { // -l
flags &= ~NETSTAT_CONNECTED;
flags |= NETSTAT_LISTENING;