Date: Fri, 27 Feb 2015 21:27:02 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279374 - projects/ifnet/sys/net Message-ID: <201502272127.t1RLR25g012161@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502272127.t1RLR25g012161>