Date: Fri, 18 Aug 2017 08:05:34 +0000 (UTC) From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322650 - head/sys/dev/safe Message-ID: <201708180805.v7I85YS8008188@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rlibby Date: Fri Aug 18 08:05:33 2017 New Revision: 322650 URL: https://svnweb.freebsd.org/changeset/base/322650 Log: 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 Modified: head/sys/dev/safe/safe.c Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Fri Aug 18 07:34:34 2017 (r322649) +++ head/sys/dev/safe/safe.c Fri Aug 18 08:05:33 2017 (r322650) @@ -1593,9 +1593,7 @@ safe_mcopy(struct mbuf *srcm, struct mbuf *dstm, u_int * 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 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708180805.v7I85YS8008188>