From eb089958347127a286c4bfff71284bdb2984d2f0 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 28 Dec 2013 17:26:27 +0100 Subject: [PATCH] Fixes coding style. --- raid/raid.c | 6 +++--- raid/raid.h | 4 ++-- raid/sort.c | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/raid/raid.c b/raid/raid.c index b63aea7e..ee4081f1 100644 --- a/raid/raid.c +++ b/raid/raid.c @@ -465,13 +465,13 @@ void raid_rec_dataonly(int nr, const int *id, const int *ip, int nd, size_t size if (nr != 0) { /* if there is a waste buffer, use it to save unused parities */ if (raid_waste_block != 0) { - void * p[RAID_PARITY_MAX]; + void *p[RAID_PARITY_MAX]; int i, j; int np; - + /* number of parities used */ np = ip[nr - 1] + 1; - + /* set unused parities to the waste buffer */ for (i = 0, j = 0; i < np; ++i) { p[i] = v[nd+i]; diff --git a/raid/raid.h b/raid/raid.h index 227889e1..406f20be 100644 --- a/raid/raid.h +++ b/raid/raid.h @@ -82,7 +82,7 @@ void raid_waste(void *zero); * Computes the parity. * * \param nd Number of data disks. - * \param np Number of parities to compute. + * \param np Number of parities to compute. * \param size Size of the blocks pointed by ::v. It must be a multipler of 64. * \param v Vector of pointers to the blocks for disks and parities. * It has (::nd + ::np) elements. The first elements are the blocks for @@ -152,7 +152,7 @@ void raid_rec_dataonly(int nr, const int *id, const int *ip, int nd, size_t size * \param n Number of integers. No more than RAID_PARITY_MAX. * \paran v Vector of integers. */ -void raid_sort(int n, int* v); +void raid_sort(int n, int *v); #endif diff --git a/raid/sort.c b/raid/sort.c index 226789ae..b41d5dea 100644 --- a/raid/sort.c +++ b/raid/sort.c @@ -26,26 +26,26 @@ } \ } while (0) -void raid_sort(int n, int* v) +void raid_sort(int n, int *v) { - /* sorting networks generated with the Batcher's Merge-Exchange algorithm */ + /* sorting networks generated with Batcher's Merge-Exchange */ switch (n) { - case 2 : + case 2: RAID_SWAP(0, 1); break; - case 3 : + case 3: RAID_SWAP(0, 2); RAID_SWAP(0, 1); RAID_SWAP(1, 2); break; - case 4 : + case 4: RAID_SWAP(0, 2); RAID_SWAP(1, 3); RAID_SWAP(0, 1); RAID_SWAP(2, 3); RAID_SWAP(1, 2); break; - case 5 : + case 5: RAID_SWAP(0, 4); RAID_SWAP(0, 2); RAID_SWAP(1, 3); @@ -56,7 +56,7 @@ void raid_sort(int n, int* v) RAID_SWAP(1, 2); RAID_SWAP(3, 4); break; - case 6 : + case 6: RAID_SWAP(0, 4); RAID_SWAP(1, 5); RAID_SWAP(0, 2);