diff options
author | Ryan Libby <rlibby@FreeBSD.org> | 2017-08-18 08:05:33 +0000 |
---|---|---|
committer | Ryan Libby <rlibby@FreeBSD.org> | 2017-08-18 08:05:33 +0000 |
commit | 19a9c3df5e37c2462e6d906d1b684aaa0faab0da (patch) | |
tree | 582403cf1a09a49b1bf5a57e81deeea938308f6a /sys/dev/safe | |
parent | e4cf0a367ec22e487319e9dd421aad978fb158c5 (diff) | |
download | src-19a9c3df5e37c2462e6d906d1b684aaa0faab0da.tar.gz src-19a9c3df5e37c2462e6d906d1b684aaa0faab0da.zip |
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
Notes
Notes:
svn path=/head/; revision=322650
Diffstat (limited to 'sys/dev/safe')
-rw-r--r-- | sys/dev/safe/safe.c | 8 |
1 files 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) |