Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nor memset(0) the structure, not the pointer itself, ...
details: https://anonhg.NetBSD.org/src/rev/3fd622aa88bb
branches: trunk
changeset: 448618:3fd622aa88bb
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Feb 06 04:20:40 2019 +0000
description:
memset(0) the structure, not the pointer itself, and what ever
data happens to be after the pointer's stack location.
diffstat:
sys/dev/nor/cfi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d0d9c0a3e6bc -r 3fd622aa88bb sys/dev/nor/cfi.c
--- a/sys/dev/nor/cfi.c Wed Feb 06 04:14:03 2019 +0000
+++ b/sys/dev/nor/cfi.c Wed Feb 06 04:20:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $ */
+/* $NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -33,7 +33,7 @@
#include "opt_cfi.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -829,7 +829,7 @@
cfi->cfi_name = jt->jt_name;
struct cfi_query_data *qryp = &cfi->cfi_qry_data;
- memset(&qryp, 0, sizeof(*qryp));
+ memset(qryp, 0, sizeof(*qryp));
qryp->id_pri = jt->jt_id_pri;
qryp->id_alt = jt->jt_id_alt;
qryp->interface_code_desc = jt->jt_interface_code_desc;
Home |
Main Index |
Thread Index |
Old Index