summaryrefslogtreecommitdiff
path: root/sys/dev/ic/sti.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-01 04:03:52 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-01 04:03:52 +0000
commite616cdcc0f1277f5f457c6d8f80bd54ac6da242d (patch)
tree5e9bce6ae1a86031ec60eb724a9c31cca82e8dd4 /sys/dev/ic/sti.c
parent449a45ec6bc0733c5f8c4a7eaab63071e4eb8d27 (diff)
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.
Diffstat (limited to 'sys/dev/ic/sti.c')
-rw-r--r--sys/dev/ic/sti.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index 2f6787b7ba9..1dfc7169ef7 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.55 2007/06/17 13:59:08 miod Exp $ */
+/* $OpenBSD: sti.c,v 1.56 2007/10/01 04:03:51 krw Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -132,13 +132,12 @@ sti_attach_common(sc, codebase)
struct sti_screen *scr;
int rc;
- scr = malloc(sizeof(struct sti_screen), M_DEVBUF, M_NOWAIT);
+ scr = malloc(sizeof(*scr), M_DEVBUF, M_NOWAIT | M_ZERO);
if (scr == NULL) {
printf("cannot allocate screen data\n");
return (ENOMEM);
}
- bzero(scr, sizeof(struct sti_screen));
sc->sc_scr = scr;
scr->scr_main = sc;