diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-09-15 16:43:52 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-09-15 16:43:52 +0000 |
commit | edb2678b922125cc3a94923d29e556e735c9b7e7 (patch) | |
tree | b179c9713e26890a9c158d42a1e1db6b305d2240 /sys/net/pf_if.c | |
parent | 9aadb8edf593100cac2242cb9715624b7948b5e7 (diff) |
malloc sweep:
-remove useless casts
-MALLOC/FREE -> malloc/free
-use M_ZERO where appropriate instead of seperate bzero
feedback & ok krw, hshoexer
Diffstat (limited to 'sys/net/pf_if.c')
-rw-r--r-- | sys/net/pf_if.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 35b932eb43e..fe243705df1 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.48 2007/09/01 18:49:27 henning Exp $ */ +/* $OpenBSD: pf_if.c,v 1.49 2007/09/15 16:43:51 henning Exp $ */ /* * Copyright 2005 Henning Brauer <henning@openbsd.org> @@ -111,10 +111,9 @@ pfi_kif_get(const char *kif_name) return (kif); /* create new one */ - if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT)) == NULL) + if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT|M_ZERO)) == NULL) return (NULL); - bzero(kif, sizeof(*kif)); strlcpy(kif->pfik_name, kif_name, sizeof(kif->pfik_name)); kif->pfik_tzero = time_second; TAILQ_INIT(&kif->pfik_dynaddrs); |