svn commit: r279374 - projects/ifnet/sys/net

Gleb Smirnoff glebius at FreeBSD.org
Fri Feb 27 21:27:03 UTC 2015


Author: glebius
Date: Fri Feb 27 21:27:02 2015
New Revision: 279374
URL: https://svnweb.freebsd.org/changeset/base/279374

Log:
  Use MTX_NEW instead of zeroed malloc.

Modified:
  projects/ifnet/sys/net/if.c

Modified: projects/ifnet/sys/net/if.c
==============================================================================
--- projects/ifnet/sys/net/if.c	Fri Feb 27 21:15:12 2015	(r279373)
+++ projects/ifnet/sys/net/if.c	Fri Feb 27 21:27:02 2015	(r279374)
@@ -3542,9 +3542,9 @@ if_snd_alloc(int maxlen)
 {
 	struct ifqueue *ifq;
 
-	ifq = malloc(sizeof(struct ifqueue), M_IFNET, M_ZERO | M_WAITOK);
+	ifq = malloc(sizeof(struct ifqueue), M_IFNET, M_WAITOK);
 	mbufq_init(&ifq->ifq_mbq, maxlen);
-	mtx_init(&ifq->ifq_mtx, "ifqueue", NULL, MTX_DEF);
+	mtx_init(&ifq->ifq_mtx, "ifqueue", NULL, MTX_DEF | MTX_NEW);
 
 	return (ifq);
 }


More information about the svn-src-projects mailing list