diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-12 01:02:03 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-12 01:02:03 +0000 |
commit | f147729185c3377ed96634261d6ba1e4d7b85753 (patch) | |
tree | 20dd1b602245856a984afb8e464e78afad1bd321 | |
parent | ad044cda5b2c1ac14a60209a6a5d01eafc0d4198 (diff) |
Use M_ZERO in malloc instead of doing a bzeor right afterwards.
From Gleydson Soares, OK beck@
-rw-r--r-- | sys/netinet/ip_carp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index c4822b6b4a7..ce5889e409e 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.171 2009/06/17 20:17:19 mpf Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.172 2010/01/12 01:02:02 claudio Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -858,10 +858,9 @@ carp_clone_create(ifc, unit) struct carp_softc *sc; struct ifnet *ifp; - sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT); + sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT|M_ZERO); if (!sc) return (ENOMEM); - bzero(sc, sizeof(*sc)); LIST_INIT(&sc->carp_vhosts); sc->sc_vhe_count = 0; |