From 4a18218d694585ddf34cccbf8661f0e425201425 Mon Sep 17 00:00:00 2001 From: "Matthew N. Dodd" Date: Mon, 13 Mar 2000 11:51:44 +0000 Subject: [PATCH] Get rid of table lookup in favor of just subtracting. Everyone else does it like this and I see no point in being different. --- sys/dev/ep/if_ep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index f5f4772cf95..c5b2eca0d4c 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,