From 19a9c3df5e37c2462e6d906d1b684aaa0faab0da Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Fri, 18 Aug 2017 08:05:33 +0000 Subject: [PATCH] safe: quiet -Wtautological-compare Code was testing that an unsigned type was >= 0. Reviewed by: markj Approved by: markj (mentor) Sponsored by: Dell EMC Isilon --- sys/dev/safe/safe.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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)