From e9b7cb7902cc8bb5ac9c456c8519103d3e494bcb Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 27 Jun 1998 12:06:50 +0000 Subject: Fix ``sizeof(u_long) == 4'' errors. Suggested by: theo --- usr.sbin/ppp/async.c | 6 +++--- usr.sbin/ppp/filter.c | 4 ++-- usr.sbin/ppp/ip.c | 3 +-- usr.sbin/ppp/lcp.c | 3 +-- usr.sbin/ppp/main.c | 3 +-- usr.sbin/ppp/route.c | 6 +++--- usr.sbin/ppp/slcompress.c | 10 +++++----- 7 files changed, 16 insertions(+), 19 deletions(-) diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c index aa6516ff2d5..137b6f9ca92 100644 --- a/usr.sbin/ppp/async.c +++ b/usr.sbin/ppp/async.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: async.c,v 1.2 1998/01/21 02:13:28 brian Exp $ + * $Id: async.c,v 1.3 1998/06/27 12:06:39 brian Exp $ * */ #include @@ -48,8 +48,8 @@ static struct async_state { int length; u_char hbuff[HDLCSIZE]; /* recv buffer */ u_char xbuff[HDLCSIZE]; /* xmit buffer */ - u_long my_accmap; - u_long his_accmap; + u_int32_t my_accmap; + u_int32_t his_accmap; } AsyncState; #define MODE_HUNT 0x01 diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index 8b2562aad13..697c9a8ec27 100644 --- a/usr.sbin/ppp/filter.c +++ b/usr.sbin/ppp/filter.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: filter.c,v 1.4 1998/01/21 02:13:31 brian Exp $ + * $Id: filter.c,v 1.5 1998/06/27 12:06:41 brian Exp $ * * TODO: Shoud send ICMP error message when we discard packets. */ @@ -47,7 +47,7 @@ struct filterent afilters[MAXFILTERS]; /* keep-alive packet filter */ static struct filterent filterdata; -static u_long netmasks[33] = { +static u_int32_t netmasks[33] = { 0x00000000, 0x80000000, 0xC0000000, 0xE0000000, 0xF0000000, 0xF8000000, 0xFC000000, 0xFE000000, 0xFF000000, diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index 78a28c9dc29..4540d713914 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.9 1998/04/25 09:23:15 brian Exp $ + * $Id: ip.c,v 1.10 1998/06/27 12:06:42 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index 02ab7f12035..b0e4cea81cc 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.9 1998/02/04 01:01:24 brian Exp $ + * $Id: lcp.c,v 1.10 1998/06/27 12:06:44 brian Exp $ * * TODO: * o Validate magic number received from peer. @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index ac2bb15af0c..f815b10041e 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.18 1998/02/11 19:45:03 brian Exp $ + * $Id: main.c,v 1.19 1998/06/27 12:06:46 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index 92cdbbc1365..0c29785c70c 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: route.c,v 1.17 1998/04/25 00:22:13 brian Exp $ + * $Id: route.c,v 1.18 1998/06/27 12:06:48 brian Exp $ * */ @@ -253,7 +253,7 @@ p_sockaddr(struct sockaddr *phost, struct sockaddr *pmask, int width) } static struct bits { - u_long b_mask; + u_int32_t b_mask; char b_val; } bits[] = { { RTF_UP, 'U' }, @@ -290,7 +290,7 @@ static struct bits { #endif static void -p_flags(u_long f, int max) +p_flags(u_int32_t f, int max) { if (VarTerm) { char name[33], *flags; diff --git a/usr.sbin/ppp/slcompress.c b/usr.sbin/ppp/slcompress.c index 29a71658694..1715d8bde64 100644 --- a/usr.sbin/ppp/slcompress.c +++ b/usr.sbin/ppp/slcompress.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: slcompress.c,v 1.2 1997/12/24 09:30:51 brian Exp $ + * $Id: slcompress.c,v 1.3 1998/06/27 12:06:49 brian Exp $ * * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: * - Initial distribution. @@ -74,7 +74,7 @@ sl_compress_init(struct slcompress * comp, int max_state) /* ENCODE encodes a number that is known to be non-zero. ENCODEZ - * checks for zero (since zero has to be encoded in the long, 3 byte + * checks for zero (since zero has to be encoded in the 32-bit, 3 byte * form). */ #define ENCODE(n) { \ @@ -103,7 +103,7 @@ sl_compress_init(struct slcompress * comp, int max_state) (f) = htonl(ntohl(f) + ((cp[1] << 8) | cp[2])); \ cp += 3; \ } else { \ - (f) = htonl(ntohl(f) + (u_long)*cp++); \ + (f) = htonl(ntohl(f) + (u_int32_t)*cp++); \ } \ } @@ -112,7 +112,7 @@ sl_compress_init(struct slcompress * comp, int max_state) (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \ cp += 3; \ } else { \ - (f) = htons(ntohs(f) + (u_long)*cp++); \ + (f) = htons(ntohs(f) + (u_int32_t)*cp++); \ } \ } @@ -121,7 +121,7 @@ sl_compress_init(struct slcompress * comp, int max_state) (f) = htons((cp[1] << 8) | cp[2]); \ cp += 3; \ } else { \ - (f) = htons((u_long)*cp++); \ + (f) = htons((u_int32_t)*cp++); \ } \ } -- cgit v1.2.3