summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2010-07-07 14:50:02 +0000
committerclaudio <claudio@openbsd.org>2010-07-07 14:50:02 +0000
commit25b79b795650476251193c9f352ca68fba6a644f (patch)
treecefca79067616733cd618730f9fa912ec3f52f4b
parentminor whitespace tweaks and clean up extra ; (diff)
downloadwireguard-openbsd-25b79b795650476251193c9f352ca68fba6a644f.tar.xz
wireguard-openbsd-25b79b795650476251193c9f352ca68fba6a644f.zip
Remove duplicate mtod(). No need to do it twice since the mbuf is not
modified in between.
-rw-r--r--sys/netmpls/mpls_output.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c
index d7fabc5db8f..f2025764dfe 100644
--- a/sys/netmpls/mpls_output.c
+++ b/sys/netmpls/mpls_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_output.c,v 1.10 2010/06/02 15:41:07 claudio Exp $ */
+/* $OpenBSD: mpls_output.c,v 1.11 2010/07/07 14:50:02 claudio Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -117,9 +117,7 @@ mpls_output(struct ifnet *ifp0, struct mbuf *m, struct sockaddr *dst,
if (ifp != NULL)
break;
- shim = mtod(m, struct shim_hdr *);
smpls->smpls_label = shim->shim_label & MPLS_LABEL_MASK;
-
rt = rtalloc1(smplstosa(smpls), RT_REPORT, 0);
if (rt == NULL) {
/* no entry for this label */