diff options
author | brian <brian@FreeBSD.org> | 1999-05-09 20:02:29 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-05-09 20:02:29 +0000 |
commit | 00d71de444cebd8e8fb9f1a6f538b0e25756fcbd (patch) | |
tree | 35a86aa77f33435584f120d89d51596207ec30c1 /usr.sbin/ppp/mbuf.h | |
parent | 81c1d3f4c6f3f0dcb719616e43e48c3b8d72888e (diff) | |
download | FreeBSD-src-00d71de444cebd8e8fb9f1a6f538b0e25756fcbd.zip FreeBSD-src-00d71de444cebd8e8fb9f1a6f538b0e25756fcbd.tar.gz |
Deal with the fact that as we now mbuf_Read the fsm
header in fsm_Input() we often end up with a NULL mbuf.
Deal with a possible NULL mbuf being passed into
mbuf_Prepend().
Adjust some spacing to make things more consistent.
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 |