Get rid of table lookup in favor of just subtracting. Everyone else

does it like this and I see no point in being different.
This commit is contained in:
Matthew N. Dodd 2000-03-13 11:51:44 +00:00
parent d718250d48
commit 4a18218d69

View File

@ -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,