summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2000-03-13 11:51:44 +0000
committermdodd <mdodd@FreeBSD.org>2000-03-13 11:51:44 +0000
commit2d3471f9ba7595c26ce42a4226455cc4fe19c759 (patch)
treeca1dca9922983290103356e2d70d65809672a62a /sys/dev/ep
parentf36cfb3d60b98d28a6b8a08569c620e979d67ef2 (diff)
downloadFreeBSD-src-2d3471f9ba7595c26ce42a4226455cc4fe19c759.zip
FreeBSD-src-2d3471f9ba7595c26ce42a4226455cc4fe19c759.tar.gz
Get rid of table lookup in favor of just subtracting. Everyone else
does it like this and I see no point in being different.
Diffstat (limited to 'sys/dev/ep')
-rw-r--r--sys/dev/ep/if_ep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index f5f4772..c5b2eca 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -435,8 +435,6 @@ ep_if_init(xsc)
splx(s);
}
-static const char padmap[] = {0, 3, 2, 1};
-
static void
ep_if_start(ifp)
struct ifnet *ifp;
@@ -465,7 +463,7 @@ startagain:
for (len = 0, top = m; m; m = m->m_next)
len += m->m_len;
- pad = padmap[len & 3];
+ pad = (4 - len) & 3;
/*
* The 3c509 automatically pads short packets to minimum ethernet length,
OpenPOWER on IntegriCloud