summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_rfc1490.c
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-06-05 23:35:31 +0000
committerarchie <archie@FreeBSD.org>2002-06-05 23:35:31 +0000
commitd14167a565aab69bc2db27d9d58542b7214b3d26 (patch)
tree79c438e42f33c8b1d1266d5cc137cdd578828f7e /sys/netgraph/ng_rfc1490.c
parenta615d0fcdd4032388124d4b85e81fe3baa903ce5 (diff)
downloadFreeBSD-src-d14167a565aab69bc2db27d9d58542b7214b3d26.zip
FreeBSD-src-d14167a565aab69bc2db27d9d58542b7214b3d26.tar.gz
Const'ify variables to make it clear we're not writing to the mbuf data.
Reviewed by: julian, brian MFC after: 1 week
Diffstat (limited to 'sys/netgraph/ng_rfc1490.c')
-rw-r--r--sys/netgraph/ng_rfc1490.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index ec1fc19..778d07b 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -215,12 +215,13 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item)
NGI_GET_M(item, m);
if (hook == priv->downlink) {
- u_char *start, *ptr;
+ const u_char *start;
+ const u_char *ptr;
if (!m || (m->m_len < MAX_ENCAPS_HDR
&& !(m = m_pullup(m, MAX_ENCAPS_HDR))))
ERROUT(ENOBUFS);
- ptr = start = mtod(m, u_char *);
+ ptr = start = mtod(m, const u_char *);
/* Must be UI frame */
if (*ptr++ != HDLC_UI)
@@ -237,7 +238,7 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item)
u_int16_t etype;
ptr += 3;
- etype = ntohs(*((u_int16_t *) ptr));
+ etype = ntohs(*((const u_int16_t *)ptr));
ptr += 2;
m_adj(m, ptr - start);
switch (etype) {
OpenPOWER on IntegriCloud