Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/tc Zero out uninitalized fields in the freshly alloc...
details: https://anonhg.NetBSD.org/src/rev/8c47cb24b7df
branches: trunk
changeset: 514941:8c47cb24b7df
user: ad <ad%NetBSD.org@localhost>
date: Fri Sep 14 11:58:39 2001 +0000
description:
Zero out uninitalized fields in the freshly allocated zs_chanstate.
diffstat:
sys/dev/tc/zs_ioasic.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 132bbcbed80c -r 8c47cb24b7df sys/dev/tc/zs_ioasic.c
--- a/sys/dev/tc/zs_ioasic.c Fri Sep 14 11:39:39 2001 +0000
+++ b/sys/dev/tc/zs_ioasic.c Fri Sep 14 11:58:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zs_ioasic.c,v 1.7 2001/05/30 15:24:25 lukem Exp $ */
+/* $NetBSD: zs_ioasic.c,v 1.8 2001/09/14 11:58:39 ad Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.7 2001/05/30 15:24:25 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.8 2001/09/14 11:58:39 ad Exp $");
/*
* Zilog Z8530 Dual UART driver (machine-dependent part). This driver
@@ -284,6 +284,7 @@
} else {
cs = malloc(sizeof(struct zs_chanstate),
M_DEVBUF, M_NOWAIT);
+ memset(cs, 0, sizeof(struct zs_chanstate));
zc = zs_ioasic_get_chan_addr(d->iada_addr, channel);
cs->cs_reg_csr = (void *)&zc->zc_csr;
Home |
Main Index |
Thread Index |
Old Index