summaryrefslogtreecommitdiffstats
path: root/module/zfs/blkptr.c
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2017-11-04 14:25:13 -0600
committerBrian Behlendorf <[email protected]>2017-11-04 13:25:13 -0700
commit1c27024e22af4386b592b30d40e6a0820ceb48c1 (patch)
tree689d4b821fd6910a137a0f93351351def5011cec /module/zfs/blkptr.c
parentdf1f129bc4150fd6ea3f23a01154a71ffa48bf12 (diff)
Undo c89 workarounds to match with upstream
With PR 5756 the zfs module now supports c99 and the remaining past c89 workarounds can be undone. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #6816
Diffstat (limited to 'module/zfs/blkptr.c')
-rw-r--r--module/zfs/blkptr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/module/zfs/blkptr.c b/module/zfs/blkptr.c
index b7529f635..ee24b1c31 100644
--- a/module/zfs/blkptr.c
+++ b/module/zfs/blkptr.c
@@ -50,7 +50,6 @@ encode_embedded_bp_compressed(blkptr_t *bp, void *data,
uint64_t *bp64 = (uint64_t *)bp;
uint64_t w = 0;
uint8_t *data8 = data;
- int i;
ASSERT3U(compressed_size, <=, BPE_PAYLOAD_SIZE);
ASSERT(uncompressed_size == compressed_size ||
@@ -69,7 +68,7 @@ encode_embedded_bp_compressed(blkptr_t *bp, void *data,
* Encode the byte array into the words of the block pointer.
* First byte goes into low bits of first word (little endian).
*/
- for (i = 0; i < compressed_size; i++) {
+ for (int i = 0; i < compressed_size; i++) {
BF64_SET(w, (i % sizeof (w)) * NBBY, NBBY, data8[i]);
if (i % sizeof (w) == sizeof (w) - 1) {
/* we've reached the end of a word */
@@ -97,7 +96,6 @@ decode_embedded_bp_compressed(const blkptr_t *bp, void *buf)
uint8_t *buf8 = buf;
uint64_t w = 0;
const uint64_t *bp64 = (const uint64_t *)bp;
- int i;
ASSERT(BP_IS_EMBEDDED(bp));
@@ -107,7 +105,7 @@ decode_embedded_bp_compressed(const blkptr_t *bp, void *buf)
* Decode the words of the block pointer into the byte array.
* Low bits of first word are the first byte (little endian).
*/
- for (i = 0; i < psize; i++) {
+ for (int i = 0; i < psize; i++) {
if (i % sizeof (w) == 0) {
/* beginning of a word */
ASSERT3P(bp64, <, bp + 1);