summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/slcompress.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-27 12:03:50 +0000
committerbrian <brian@FreeBSD.org>1998-06-27 12:03:50 +0000
commit6a5332c7c79dd1e6809f85f057a351c5f861749e (patch)
treea386301ec5dd09bbb7f26f0a6d1a58af9f87d614 /usr.sbin/ppp/slcompress.c
parent0e8196a1ea13c1cc385e349ebf8dde5e70b1b7aa (diff)
downloadFreeBSD-src-6a5332c7c79dd1e6809f85f057a351c5f861749e.zip
FreeBSD-src-6a5332c7c79dd1e6809f85f057a351c5f861749e.tar.gz
Don't assume ``sizeof(u_long) == 4''
Submitted by: Theo
Diffstat (limited to 'usr.sbin/ppp/slcompress.c')
-rw-r--r--usr.sbin/ppp/slcompress.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/slcompress.c b/usr.sbin/ppp/slcompress.c
index 503f470..c6dfe62 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.17 1998/06/14 00:56:11 brian Exp $
+ * $Id: slcompress.c,v 1.18 1998/06/15 19:06:24 brian Exp $
*
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
* - Initial distribution.
@@ -76,7 +76,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) { \
@@ -105,7 +105,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++); \
} \
}
@@ -114,7 +114,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++); \
} \
}
@@ -123,7 +123,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++); \
} \
}
OpenPOWER on IntegriCloud