summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2007-11-17 23:14:06 +0000
committerjb <jb@FreeBSD.org>2007-11-17 23:14:06 +0000
commit30baf38e0e487eb5731da0367e9b5467548b831c (patch)
tree4450cbfcde7bb13f00fb0ab79f3b96d3d3b9c842
parentee4b9334d134a020a5a2e551d381f0c13625afb8 (diff)
downloadFreeBSD-src-30baf38e0e487eb5731da0367e9b5467548b831c.zip
FreeBSD-src-30baf38e0e487eb5731da0367e9b5467548b831c.tar.gz
Use uintptr_t to cast a pointer to an integer to avoid compiler warnings
on processors where sizeof(void *) > sizeof(int).
-rw-r--r--usr.sbin/ppp/chap.h2
-rw-r--r--usr.sbin/ppp/physical.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chap.h b/usr.sbin/ppp/chap.h
index 617555d..08c6865 100644
--- a/usr.sbin/ppp/chap.h
+++ b/usr.sbin/ppp/chap.h
@@ -61,7 +61,7 @@ struct chap {
#define descriptor2chap(d) \
((d)->type == CHAP_DESCRIPTOR ? (struct chap *)(d) : NULL)
#define auth2chap(a) \
- ((struct chap *)((char *)a - (int)&((struct chap *)0)->auth))
+ ((struct chap *)((char *)a - (uintptr_t)&((struct chap *)0)->auth))
struct MSCHAPv2_resp { /* rfc2759 */
char PeerChallenge[16];
diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h
index f16e1a1..ab0cdba 100644
--- a/usr.sbin/ppp/physical.h
+++ b/usr.sbin/ppp/physical.h
@@ -116,7 +116,7 @@ struct physical {
};
#define field2phys(fp, name) \
- ((struct physical *)((char *)fp - (int)(&((struct physical *)0)->name)))
+ ((struct physical *)((char *)fp - (uintptr_t)(&((struct physical *)0)->name)))
#define link2physical(l) \
((l)->type == PHYSICAL_LINK ? field2phys(l, link) : NULL)
OpenPOWER on IntegriCloud