X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/34a8182d98df7ad8739705b749104b448f81148f..4a404244ad5a6e8679d302ed44ecc61cac172725:/usr/src/sys/vax/if/if_ec.c diff --git a/usr/src/sys/vax/if/if_ec.c b/usr/src/sys/vax/if/if_ec.c index 0d65245652..3aa5f69b5c 100644 --- a/usr/src/sys/vax/if/if_ec.c +++ b/usr/src/sys/vax/if/if_ec.c @@ -655,7 +655,19 @@ COUNT(ECPUT); mp = m; while (mp) { mcp = mtod(mp, char *); + i = 0; + if ((int)bp&1) { + *bp++ = *mcp++; + i++; + } for (i=0; im_len; i++) + while (i < mp->m_len) { + *(short *)bp = *(short *)mcp; + bp += 2; + mcp += 2; + i += 2; + } + if (mp->m_len&1) *bp++ = *mcp++; mp = m_free(mp); } @@ -666,6 +678,9 @@ COUNT(ECPUT); /* * Routine to copy from UNIBUS memory into mbufs. * Similar in spirit to if_rubaget. + * + * Warning: This makes the fairly safe assumption that + * mbufs have even lengths. */ struct mbuf * ecget(ecbuf, totlen, off0) @@ -707,7 +722,12 @@ COUNT(ECGET); m->m_off = MMINOFF; } mcp = mtod(m, char *); - for (i=0; im_next;