diff options
Diffstat (limited to 'usr.sbin/ppp/mbuf.h')
-rw-r--r-- | usr.sbin/ppp/mbuf.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ppp/mbuf.h b/usr.sbin/ppp/mbuf.h index f92dcd5..f18f693 100644 --- a/usr.sbin/ppp/mbuf.h +++ b/usr.sbin/ppp/mbuf.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: mbuf.h,v 1.15 1999/03/29 08:21:28 brian Exp $ + * $Id: mbuf.h,v 1.16 1999/05/08 11:07:09 brian Exp $ * * TODO: */ @@ -36,8 +36,11 @@ struct mqueue { int qlen; }; -#define MBUF_CTOP(bp) ((u_char *)((bp)+1) + (bp)->offset) -#define CONST_MBUF_CTOP(bp) ((const u_char *)((bp)+1) + (bp)->offset) +#define MBUF_CTOP(bp) \ + ((bp) ? (u_char *)((bp)+1) + (bp)->offset : NULL) + +#define CONST_MBUF_CTOP(bp) \ + ((bp) ? (const u_char *)((bp)+1) + (bp)->offset : NULL) #define MB_ASYNC 1 #define MB_FSM 2 |