Date: Fri, 14 Nov 2014 15:44:20 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274509 - head/sys/kern Message-ID: <201411141544.sAEFiKm3002115@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Nov 14 15:44:19 2014 New Revision: 274509 URL: https://svnweb.freebsd.org/changeset/base/274509 Log: - Use NULL to compare a pointer. - Use KASSERT() instead of panic. - Remove useless 'continue', no need to restart cycle here. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Fri Nov 14 15:39:11 2014 (r274508) +++ head/sys/kern/uipc_sockbuf.c Fri Nov 14 15:44:19 2014 (r274509) @@ -881,12 +881,10 @@ sbcut_internal(struct sockbuf *sb, int l mfree = NULL; while (len > 0) { - if (m == 0) { - if (next == 0) - panic("sbdrop"); + if (m == NULL) { + KASSERT(next, ("%s: no next, len %d", __func__, len)); m = next; next = m->m_nextpkt; - continue; } if (m->m_len > len) { m->m_len -= len;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411141544.sAEFiKm3002115>