From f5461d41b129fefc48ff4c9ded82554394de9bf0 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 6 Oct 2007 23:50:56 +0000 Subject: Simpliest memset(,0,) -> M_ZERO changes. One (caddr *) cast removal, otherwise just adding M_ZERO to malloc() and removing the immediately adjacent memset(,0,). --- sys/dev/sequencer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/sequencer.c') diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index e7df1b0de77..9e6106d4e3c 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sequencer.c,v 1.14 2007/09/05 23:36:12 jakemsr Exp $ */ +/* $OpenBSD: sequencer.c,v 1.15 2007/10/06 23:50:54 krw Exp $ */ /* $NetBSD: sequencer.c,v 1.13 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -1041,9 +1041,8 @@ midiseq_open(int unit, int flags) return (0); sc = midi_cd.cd_devs[unit]; sc->seqopen = 1; - md = malloc(sizeof *md, M_DEVBUF, M_WAITOK); + md = malloc(sizeof *md, M_DEVBUF, M_WAITOK | M_ZERO); sc->seq_md = md; - memset(md, 0, sizeof *md); md->msc = sc; midi_getinfo(makedev(0, unit), &mi); md->unit = unit; -- cgit v1.2.3