mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Use uintptr_t to cast a pointer to an integer to avoid compiler warnings
on processors where sizeof(void *) > sizeof(int).
This commit is contained in:
parent
242ef17d6d
commit
16e790da5a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173710
@ -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];
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user