From 0fc06c6a3f99b583852348bdd5c8ff48b4e3e18c Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Wed, 13 Nov 2002 20:31:13 +0000 Subject: [PATCH] Okay, finally let's use the BSD'ish _howmany() macro. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1918 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bin/ping/ping.c | 5 +---- src/apps/bin/traceroute/traceroute.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/apps/bin/ping/ping.c b/src/apps/bin/ping/ping.c index 3a1362117a..0c264d1115 100644 --- a/src/apps/bin/ping/ping.c +++ b/src/apps/bin/ping/ping.c @@ -69,14 +69,11 @@ #include #include #include -//#include #include #include #include #include -#define howmany(x, y) _howmany(x, y) - #define DEFDATALEN (64 - 8) /* default data length */ #define MAXIPLEN 60 #define MAXICMPLEN 76 @@ -475,7 +472,7 @@ int main(int argc, char **argv) if ((options & F_FLOOD) == 0) catcher(); /* start things going */ - fdmasks = howmany(s+1, NFDBITS) * sizeof(fd_mask); + fdmasks = _howmany(s+1, NFDBITS) * sizeof(fd_mask); if ((fdmaskp = (fd_set *)malloc(fdmasks)) == NULL) err(1, "malloc"); diff --git a/src/apps/bin/traceroute/traceroute.c b/src/apps/bin/traceroute/traceroute.c index 93776aea0c..5bfbe8777c 100644 --- a/src/apps/bin/traceroute/traceroute.c +++ b/src/apps/bin/traceroute/traceroute.c @@ -219,8 +219,6 @@ #include #include -#define howmany(x, y) _howmany(x, y) - #include #include @@ -696,7 +694,7 @@ wait_for_reply(sock, from, sent) size_t fromlen = sizeof (*from); fd_set *fdsp; - fdsn = howmany(sock+1, NFDBITS) * sizeof(fd_mask); + fdsn = _howmany(sock+1, NFDBITS) * sizeof(fd_mask); if ((fdsp = (fd_set *)malloc(fdsn)) == NULL) err(1, "malloc"); memset(fdsp, 0, fdsn);