diff options
| author | christos <christos@NetBSD.org> | 2019-02-09 03:33:59 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2019-02-09 03:33:59 +0000 |
| commit | f9496794ff5670818d14b58cb9ffda8f702eaed7 (patch) | |
| tree | 44b46fe0fb83d0c2f7514745778b296e33474227 /sys/dev/raidframe/rf_interdecluster.c | |
| parent | 96d63dcbe0bd602859527fcd9c280042831fea01 (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_interdecluster.c')
| -rw-r--r-- | sys/dev/raidframe/rf_interdecluster.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_interdecluster.c b/sys/dev/raidframe/rf_interdecluster.c index fc6604a4d25..73e6a140d00 100644 --- a/sys/dev/raidframe/rf_interdecluster.c +++ b/sys/dev/raidframe/rf_interdecluster.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_interdecluster.c,v 1.14 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_interdecluster.c,v 1.15 2019/02/09 03:34:00 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_interdecluster.c,v 1.14 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_interdecluster.c,v 1.15 2019/02/09 03:34:00 christos Exp $"); #include "rf_archs.h" @@ -73,8 +73,7 @@ rf_ConfigureInterDecluster( RF_RowCol_t i, tmp, SUs_per_region; /* create an Interleaved Declustering configuration structure */ - RF_MallocAndAdd(info, sizeof(RF_InterdeclusterConfigInfo_t), (RF_InterdeclusterConfigInfo_t *), - raidPtr->cleanupList); + info = RF_MallocAndAdd(sizeof(*info), raidPtr->cleanupList); if (info == NULL) return (ENOMEM); layoutPtr->layoutSpecificInfo = (void *) info; |
