diff options
author | kbyanc <kbyanc@FreeBSD.org> | 2002-05-08 01:08:26 +0000 |
---|---|---|
committer | kbyanc <kbyanc@FreeBSD.org> | 2002-05-08 01:08:26 +0000 |
commit | 85be496b9944ba8f8f7f3e91b3e3ac21fe71c053 (patch) | |
tree | adfcfeba58602417d07566e4755ffa11a4dfaf69 /sys/net/iso88025.h | |
parent | fa7702afe4f1e0a7f41978f139d0ab29e62b423a (diff) | |
download | FreeBSD-src-85be496b9944ba8f8f7f3e91b3e3ac21fe71c053.zip FreeBSD-src-85be496b9944ba8f8f7f3e91b3e3ac21fe71c053.tar.gz |
Roll my own min() (named ISO88025_MIN() so as to not cause conflicts) so
that this header may be included from userland where min() may not be
declared (or worse, declared differently). I open to alternative
solutions.
Diffstat (limited to 'sys/net/iso88025.h')
-rw-r--r-- | sys/net/iso88025.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h index aad8d54..1c38b91 100644 --- a/sys/net/iso88025.h +++ b/sys/net/iso88025.h @@ -114,9 +114,11 @@ struct iso88025_sockaddr_dl_data { u_short *trld_route[RIF_MAX_LEN]; }; +#define ISO88025_MIN(a, b) (((a)<(b))?(a):(b)) #define SDL_ISO88025(s) ((struct iso88025_sockaddr_dl_data *) \ - ((s)->sdl_data + min((s)->sdl_nlen + \ - (s)->sdl_alen + (s)->sdl_slen, 12))) + ((s)->sdl_data + \ + ISO88025_MIN((s)->sdl_nlen + (s)->sdl_alen + \ + (s)->sdl_slen, 12))) /* * Structure of a 48-bit iso 802.5 address. |