Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Replace broken memset with M_ZERO
details: https://anonhg.NetBSD.org/src/rev/fa82d8d6d247
branches: trunk
changeset: 771577:fa82d8d6d247
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 25 13:55:40 2011 +0000
description:
Replace broken memset with M_ZERO
diffstat:
sys/dev/ata/wd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r d527110336a6 -r fa82d8d6d247 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Fri Nov 25 13:49:43 2011 +0000
+++ b/sys/dev/ata/wd.c Fri Nov 25 13:55:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.389 2011/10/27 13:07:37 jakllsch Exp $ */
+/* $NetBSD: wd.c,v 1.390 2011/11/25 13:55:40 joerg Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.389 2011/10/27 13:07:37 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.390 2011/11/25 13:55:40 joerg Exp $");
#include "opt_ata.h"
@@ -1276,10 +1276,10 @@
#ifdef __HAVE_OLD_DISKLABEL
if (xfer == ODIOCSDINFO || xfer == ODIOCWDINFO) {
- newlabel = malloc(sizeof *newlabel, M_TEMP, M_WAITOK);
+ newlabel = malloc(sizeof *newlabel, M_TEMP,
+ M_WAITOK | M_ZERO);
if (newlabel == NULL)
return EIO;
- memset(newlabel, 0, sizeof newlabel);
memcpy(newlabel, addr, sizeof (struct olddisklabel));
lp = newlabel;
} else
Home |
Main Index |
Thread Index |
Old Index