svn commit: r274509 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Fri Nov 14 15:44:20 UTC 2014
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;
More information about the svn-src-all
mailing list