diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 04:03:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 04:03:52 +0000 |
commit | e616cdcc0f1277f5f457c6d8f80bd54ac6da242d (patch) | |
tree | 5e9bce6ae1a86031ec60eb724a9c31cca82e8dd4 /sys/dev/ic/ac97.c | |
parent | 449a45ec6bc0733c5f8c4a7eaab63071e4eb8d27 (diff) |
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.
Diffstat (limited to 'sys/dev/ic/ac97.c')
-rw-r--r-- | sys/dev/ic/ac97.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index eb9bcbce362..d19103ca1d3 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ac97.c,v 1.63 2007/07/27 01:48:04 ian Exp $ */ +/* $OpenBSD: ac97.c,v 1.64 2007/10/01 04:03:51 krw Exp $ */ /* * Copyright (c) 1999, 2000 Constantine Sapuntzakis @@ -714,11 +714,9 @@ ac97_attach(struct ac97_host_if *host_if) initfunc = NULL; - if (!(as = malloc(sizeof(struct ac97_softc), M_DEVBUF, M_NOWAIT))) + if (!(as = malloc(sizeof(*as), M_DEVBUF, M_NOWAIT | M_ZERO))) return (ENOMEM); - bzero(as, sizeof(*as)); - as->codec_if.vtbl = &ac97civ; as->host_if = host_if; |