Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern more MFREE -> m_free
details: https://anonhg.NetBSD.org/src/rev/02a4f57b4744
branches: trunk
changeset: 818194:02a4f57b4744
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 02 19:26:46 2016 +0000
description:
more MFREE -> m_free
diffstat:
sys/kern/uipc_socket.c | 13 +++++--------
sys/kern/uipc_socket2.c | 16 +++++++---------
2 files changed, 12 insertions(+), 17 deletions(-)
diffs (109 lines):
diff -r 1e34d899eefc -r 02a4f57b4744 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sun Oct 02 19:02:57 2016 +0000
+++ b/sys/kern/uipc_socket.c Sun Oct 02 19:26:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.248 2016/06/10 13:27:15 ozaki-r Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.249 2016/10/02 19:26:46 christos Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.248 2016/06/10 13:27:15 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.249 2016/10/02 19:26:46 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1324,8 +1324,7 @@
m->m_next = NULL;
m = so->so_rcv.sb_mb;
} else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
+ m = so->so_rcv.sb_mb = m_free(m);
}
sbsync(&so->so_rcv, nextrecord);
}
@@ -1349,8 +1348,7 @@
m->m_next = 0;
m = so->so_rcv.sb_mb;
} else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
+ m = so->so_rcv.sb_mb = m_free(m);
}
}
}
@@ -1505,8 +1503,7 @@
so->so_rcv.sb_mb = m = m->m_next;
*mp = NULL;
} else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
+ m = so->so_rcv.sb_mb = m_free(m);
}
/*
* If m != NULL, we also know that
diff -r 1e34d899eefc -r 02a4f57b4744 sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c Sun Oct 02 19:02:57 2016 +0000
+++ b/sys/kern/uipc_socket2.c Sun Oct 02 19:26:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket2.c,v 1.123 2016/05/23 13:54:34 tls Exp $ */
+/* $NetBSD: uipc_socket2.c,v 1.124 2016/10/02 19:26:46 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.123 2016/05/23 13:54:34 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.124 2016/10/02 19:26:46 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -1167,7 +1167,7 @@
sbfree(sb, np);
n0 = n->m_nextpkt; /* iterate at next prepended address */
- MFREE(n, np); /* free prepended address (not data) */
+ np = m_free(n); /* free prepended address (not data) */
}
return error;
}
@@ -1297,7 +1297,7 @@
void
sbdrop(struct sockbuf *sb, int len)
{
- struct mbuf *m, *mn, *next;
+ struct mbuf *m, *next;
KASSERT(solocked(sb->sb_so));
@@ -1319,13 +1319,11 @@
}
len -= m->m_len;
sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
+ m = m_free(m);
}
while (m && m->m_len == 0) {
sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
+ m = m_free(m);
}
if (m) {
sb->sb_mb = m;
@@ -1361,7 +1359,7 @@
sb->sb_mb = m->m_nextpkt;
do {
sbfree(sb, m);
- MFREE(m, mn);
+ mn = m_free(m);
} while ((m = mn) != NULL);
}
SB_EMPTY_FIXUP(sb);
Home |
Main Index |
Thread Index |
Old Index