summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_driver.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2019-02-09 03:33:59 +0000
committerchristos <christos@NetBSD.org>2019-02-09 03:33:59 +0000
commitf9496794ff5670818d14b58cb9ffda8f702eaed7 (patch)
tree44b46fe0fb83d0c2f7514745778b296e33474227 /sys/dev/raidframe/rf_driver.c
parent96d63dcbe0bd602859527fcd9c280042831fea01 (diff)
- Change the allocation macros to be more like function calls
- Change sizeof(type) -> sizeof(*variable) - Use macros for the long buffer length allocations - Remove "bit polishing" memsets() -- do them only once - Remove unnecessary casts Thanks to oster@ for finding bugs and testing.
Diffstat (limited to 'sys/dev/raidframe/rf_driver.c')
-rw-r--r--sys/dev/raidframe/rf_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index e6958687d2b..9230930b02a 100644
--- a/sys/dev/raidframe/rf_driver.c
+++ b/sys/dev/raidframe/rf_driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_driver.c,v 1.134 2019/01/08 07:18:18 mrg Exp $ */
+/* $NetBSD: rf_driver.c,v 1.135 2019/02/09 03:34:00 christos Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -66,7 +66,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.134 2019/01/08 07:18:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.135 2019/02/09 03:34:00 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_diagnostic.h"
@@ -587,7 +587,7 @@ rf_AllocRaidAccDesc(RF_Raid_t *raidPtr, RF_IoType_t type,
desc->status = 0;
desc->numRetries = 0;
#if RF_ACC_TRACE > 0
- memset((char *) &desc->tracerec, 0, sizeof(RF_AccTraceEntry_t));
+ memset(&desc->tracerec, 0, sizeof(desc->tracerec));
#endif
desc->callbackFunc = NULL;
desc->callbackArg = NULL;