diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index 93714ca32276..a6a013727a23 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -1593,9 +1593,7 @@ safe_mcopy(struct mbuf *srcm, struct mbuf *dstm, u_int offset) * Advance src and dst to offset. */ j = offset; - while (j >= 0) { - if (srcm->m_len > j) - break; + while (j >= srcm->m_len) { j -= srcm->m_len; srcm = srcm->m_next; if (srcm == NULL) @@ -1605,9 +1603,7 @@ safe_mcopy(struct mbuf *srcm, struct mbuf *dstm, u_int offset) slen = srcm->m_len - j; j = offset; - while (j >= 0) { - if (dstm->m_len > j) - break; + while (j >= dstm->m_len) { j -= dstm->m_len; dstm = dstm->m_next; if (dstm == NULL)