]> granicus.if.org Git - zfs/commitdiff
Revert gcc-shadow using -Wno-shadow I can live with
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 May 2010 19:34:45 +0000 (12:34 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 May 2010 19:34:45 +0000 (12:34 -0700)
While I would rather fix all the instances where something is shadowed
it complicates tracking the OpenSolaris code where they either don't
seem to care or have different conflicts.  Anyway, this ends up being
more simply gratutous change than I care for.

16 files changed:
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_mount.c
lib/libzfs/libzfs_sendrecv.c
lib/libzfs/libzfs_util.c
lib/libzpool/kernel.c
lib/libzpool/util.c
module/zcommon/zfs_prop.c
module/zcommon/zpool_prop.c
module/zcommon/zprop_common.c
module/zfs/dmu.c
module/zfs/dmu_objset.c
module/zfs/dmu_send.c
module/zfs/dmu_zfetch.c
module/zfs/dnode.c
module/zfs/txg.c
module/zfs/vdev_raidz.c

index c4d8dd038d621291fece104697ca70bba7eae6e1..ab9ba6b80143bfb3336ec6f98ab7f96531a7c957 100644 (file)
@@ -728,14 +728,15 @@ libzfs_mnttab_remove(libzfs_handle_t *hdl, const char *fsname)
 }
 
 int
-zfs_spa_version(zfs_handle_t *zhp, int *version)
+zfs_spa_version(zfs_handle_t *zhp, int *spa_version)
 {
-       zpool_handle_t *handle = zhp->zpool_hdl;
+       zpool_handle_t *zpool_handle = zhp->zpool_hdl;
 
-       if (handle == NULL)
+       if (zpool_handle == NULL)
                return (-1);
 
-       *version = zpool_get_prop_int(handle, ZPOOL_PROP_VERSION, NULL);
+       *spa_version = zpool_get_prop_int(zpool_handle,
+           ZPOOL_PROP_VERSION, NULL);
        return (0);
 }
 
@@ -745,12 +746,12 @@ zfs_spa_version(zfs_handle_t *zhp, int *version)
 static int
 zfs_which_resv_prop(zfs_handle_t *zhp, zfs_prop_t *resv_prop)
 {
-       int version;
+       int spa_version;
 
-       if (zfs_spa_version(zhp, &version) < 0)
+       if (zfs_spa_version(zhp, &spa_version) < 0)
                return (-1);
 
-       if (version >= SPA_VERSION_REFRESERVATION)
+       if (spa_version >= SPA_VERSION_REFRESERVATION)
                *resv_prop = ZFS_PROP_REFRESERVATION;
        else
                *resv_prop = ZFS_PROP_RESERVATION;
@@ -1773,11 +1774,11 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
                 */
                {
                        val = getprop_uint64(zhp, prop, &source);
-                       time_t local_time = (time_t)val;
+                       time_t time = (time_t)val;
                        struct tm t;
 
                        if (literal ||
-                           localtime_r(&local_time, &t) == NULL ||
+                           localtime_r(&time, &t) == NULL ||
                            strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
                            &t) == 0)
                                (void) snprintf(propbuf, proplen, "%llu", val);
index 906e4aa285932245977d4d73a239eb3e794de317..7810e5d68fafc8276afb79ac701d57079d03010a 100644 (file)
@@ -205,12 +205,12 @@ is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto)
  * informative error message.
  */
 static boolean_t
-dir_is_empty(const char *dirn)
+dir_is_empty(const char *dirname)
 {
        DIR *dirp;
        struct dirent64 *dp;
 
-       if ((dirp = opendir(dirn)) == NULL)
+       if ((dirp = opendir(dirname)) == NULL)
                return (B_TRUE);
 
        while ((dp = readdir64(dirp)) != NULL) {
index e9b2e794d0729a8d1c0b422739d850bb5b1a5de5..1ffb6294cfdca3b6e4894b323fabe1c42a173d74 100644 (file)
@@ -1895,13 +1895,13 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
                 */
                avl_tree_t *local_avl;
                nvlist_t *local_nv, *fs;
+               char *cp = strchr(zc.zc_value, '@');
 
                /*
                 * XXX Do this faster by just iterating over snaps in
                 * this fs.  Also if zc_value does not exist, we will
                 * get a strange "does not exist" error message.
                 */
-               cp = strchr(zc.zc_value, '@');
                *cp = '\0';
                if (gather_nvlist(hdl, zc.zc_value, NULL, NULL,
                    &local_nv, &local_avl) == 0) {
index a30f6151f68bc4393e28faf01e2edf5adf0e789b..4da0fb44b2c1aba95bcca3a42b9d165d0ebda26d 100644 (file)
@@ -526,19 +526,19 @@ void
 zfs_nicenum(uint64_t num, char *buf, size_t buflen)
 {
        uint64_t n = num;
-       int i = 0, j;
+       int index = 0;
        char u;
 
        while (n >= 1024) {
                n /= 1024;
-               i++;
+               index++;
        }
 
-       u = " KMGTPE"[i];
+       u = " KMGTPE"[index];
 
-       if (i == 0) {
+       if (index == 0) {
                (void) snprintf(buf, buflen, "%llu", n);
-       } else if ((num & ((1ULL << 10 * i) - 1)) == 0) {
+       } else if ((num & ((1ULL << 10 * index) - 1)) == 0) {
                /*
                 * If this is an even multiple of the base, always display
                 * without any decimal precision.
@@ -554,9 +554,10 @@ zfs_nicenum(uint64_t num, char *buf, size_t buflen)
                 * develop some complex heuristics for this, but it's much
                 * easier just to try each combination in turn.
                 */
-               for (j = 2; j >= 0; j--) {
-                       if (snprintf(buf, buflen, "%.*f%c", j,
-                           (double)num / (1ULL << 10 * i), u) <= 5)
+               int i;
+               for (i = 2; i >= 0; i--) {
+                       if (snprintf(buf, buflen, "%.*f%c", i,
+                           (double)num / (1ULL << 10 * index), u) <= 5)
                                break;
                }
        }
@@ -1385,7 +1386,7 @@ zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp, zfs_type_t type)
 {
        zprop_list_t *entry;
        zprop_list_t **last;
-       expand_data_t ed;
+       expand_data_t exp;
 
        if (*plp == NULL) {
                /*
@@ -1395,11 +1396,11 @@ zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp, zfs_type_t type)
                 */
                last = plp;
 
-               ed.last = last;
-               ed.hdl = hdl;
-               ed.type = type;
+               exp.last = last;
+               exp.hdl = hdl;
+               exp.type = type;
 
-               if (zprop_iter_common(zprop_expand_list_cb, &ed, B_FALSE,
+               if (zprop_iter_common(zprop_expand_list_cb, &exp, B_FALSE,
                    B_FALSE, type) == ZPROP_INVAL)
                        return (-1);
 
index d5d31802dedfd97fb768de5217639cd05c169ca1..89108fe5b2b1bf0950eeec985282701da4a9a355 100644 (file)
@@ -323,7 +323,7 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
        int fd;
        vnode_t *vp;
        int old_umask;
-       char real_path[MAXPATHLEN];
+       char realpath[MAXPATHLEN];
        struct stat64 st;
 
        /*
@@ -346,14 +346,14 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
                        return (errno);
                }
                close(fd);
-               (void) sprintf(real_path, "%s", path);
+               (void) sprintf(realpath, "%s", path);
                dsk = strstr(path, "/dsk/");
                if (dsk != NULL)
-                       (void) sprintf(real_path + (dsk - path) + 1, "r%s",
+                       (void) sprintf(realpath + (dsk - path) + 1, "r%s",
                            dsk + 1);
        } else {
-               (void) sprintf(real_path, "%s", path);
-               if (!(flags & FCREAT) && stat64(real_path, &st) == -1)
+               (void) sprintf(realpath, "%s", path);
+               if (!(flags & FCREAT) && stat64(realpath, &st) == -1)
                        return (errno);
        }
 
@@ -364,7 +364,7 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
         * The construct 'flags - FREAD' conveniently maps combinations of
         * FREAD and FWRITE to the corresponding O_RDONLY, O_WRONLY, and O_RDWR.
         */
-       fd = open64(real_path, flags - FREAD, mode);
+       fd = open64(realpath, flags - FREAD, mode);
 
        if (flags & FCREAT)
                (void) umask(old_umask);
@@ -393,16 +393,16 @@ int
 vn_openat(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2,
     int x3, vnode_t *startvp, int fd)
 {
-       char *real_path = umem_alloc(strlen(path) + 2, UMEM_NOFAIL);
+       char *realpath = umem_alloc(strlen(path) + 2, UMEM_NOFAIL);
        int ret;
 
        ASSERT(startvp == rootdir);
-       (void) sprintf(real_path, "/%s", path);
+       (void) sprintf(realpath, "/%s", path);
 
        /* fd ignored for now, need if want to simulate nbmand support */
-       ret = vn_open(real_path, x1, flags, mode, vpp, x2, x3);
+       ret = vn_open(realpath, x1, flags, mode, vpp, x2, x3);
 
-       umem_free(real_path, strlen(path) + 2);
+       umem_free(realpath, strlen(path) + 2);
 
        return (ret);
 }
@@ -744,11 +744,11 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len)
 }
 
 int
-ddi_strtoul(const char *serial, char **nptr, int base, unsigned long *result)
+ddi_strtoul(const char *hw_serial, char **nptr, int base, unsigned long *result)
 {
        char *end;
 
-       *result = strtoul(serial, &end, base);
+       *result = strtoul(hw_serial, &end, base);
        if (*result == 0)
                return (errno);
        return (0);
index ecc3752bbc8e685b871222c8363e47f79ad817eb..781edb6e8abcbd56201364899103bb6134e761c0 100644 (file)
@@ -41,24 +41,24 @@ void
 nicenum(uint64_t num, char *buf)
 {
        uint64_t n = num;
-       int i = 0;
+       int index = 0;
        char u;
 
        while (n >= 1024) {
                n = (n + (1024 / 2)) / 1024; /* Round up or down */
-               i++;
+               index++;
        }
 
-       u = " KMGTPE"[i];
+       u = " KMGTPE"[index];
 
-       if (i == 0) {
+       if (index == 0) {
                (void) sprintf(buf, "%llu", (u_longlong_t)n);
        } else if (n < 10 && (num & (num - 1)) != 0) {
                (void) sprintf(buf, "%.2f%c",
-                   (double)num / (1ULL << 10 * i), u);
+                   (double)num / (1ULL << 10 * index), u);
        } else if (n < 100 && (num & (num - 1)) != 0) {
                (void) sprintf(buf, "%.1f%c",
-                   (double)num / (1ULL << 10 * i), u);
+                   (double)num / (1ULL << 10 * index), u);
        } else {
                (void) sprintf(buf, "%llu%c", (u_longlong_t)n, u);
        }
index 2e8f5a77facce489eb4d1fa46e86bd76fbee687b..6a3284609c06cb5b866920fbb9e1107a63b461d4 100644 (file)
@@ -410,15 +410,15 @@ zfs_prop_userquota(const char *name)
  * (strings) and internal representation (uint64_t).
  */
 int
-zfs_prop_string_to_index(zfs_prop_t prop, const char *string, uint64_t *idx)
+zfs_prop_string_to_index(zfs_prop_t prop, const char *string, uint64_t *index)
 {
-       return (zprop_string_to_index(prop, string, idx, ZFS_TYPE_DATASET));
+       return (zprop_string_to_index(prop, string, index, ZFS_TYPE_DATASET));
 }
 
 int
-zfs_prop_index_to_string(zfs_prop_t prop, uint64_t idx, const char **string)
+zfs_prop_index_to_string(zfs_prop_t prop, uint64_t index, const char **string)
 {
-       return (zprop_index_to_string(prop, idx, string, ZFS_TYPE_DATASET));
+       return (zprop_index_to_string(prop, index, string, ZFS_TYPE_DATASET));
 }
 
 /*
index fd24c34d4635ffec24762329741cce92e0f821e2..d57dcfb638b0f24054246b32ed227ab1a713c38e 100644 (file)
@@ -154,16 +154,16 @@ zpool_prop_default_numeric(zpool_prop_t prop)
 
 int
 zpool_prop_string_to_index(zpool_prop_t prop, const char *string,
-    uint64_t *idx)
+    uint64_t *index)
 {
-       return (zprop_string_to_index(prop, string, idx, ZFS_TYPE_POOL));
+       return (zprop_string_to_index(prop, string, index, ZFS_TYPE_POOL));
 }
 
 int
-zpool_prop_index_to_string(zpool_prop_t prop, uint64_t idx,
+zpool_prop_index_to_string(zpool_prop_t prop, uint64_t index,
     const char **string)
 {
-       return (zprop_index_to_string(prop, idx, string, ZFS_TYPE_POOL));
+       return (zprop_index_to_string(prop, index, string, ZFS_TYPE_POOL));
 }
 
 #ifndef _KERNEL
index 27e57b60d30ac520f43dd2ff43560a1a073ccfab..85f55c27628e504b0cc0001160236b49b7f6938a 100644 (file)
@@ -256,7 +256,7 @@ zprop_name_to_prop(const char *propname, zfs_type_t type)
 }
 
 int
-zprop_string_to_index(int prop, const char *string, uint64_t *idx,
+zprop_string_to_index(int prop, const char *string, uint64_t *index,
     zfs_type_t type)
 {
        zprop_desc_t *prop_tbl;
@@ -273,7 +273,7 @@ zprop_string_to_index(int prop, const char *string, uint64_t *idx,
 
        for (i = 0; idx_tbl[i].pi_name != NULL; i++) {
                if (strcmp(string, idx_tbl[i].pi_name) == 0) {
-                       *idx = idx_tbl[i].pi_value;
+                       *index = idx_tbl[i].pi_value;
                        return (0);
                }
        }
@@ -282,7 +282,7 @@ zprop_string_to_index(int prop, const char *string, uint64_t *idx,
 }
 
 int
-zprop_index_to_string(int prop, uint64_t idx, const char **string,
+zprop_index_to_string(int prop, uint64_t index, const char **string,
     zfs_type_t type)
 {
        zprop_desc_t *prop_tbl;
@@ -298,7 +298,7 @@ zprop_index_to_string(int prop, uint64_t idx, const char **string,
                return (-1);
 
        for (i = 0; idx_tbl[i].pi_name != NULL; i++) {
-               if (idx_tbl[i].pi_value == idx) {
+               if (idx_tbl[i].pi_value == index) {
                        *string = idx_tbl[i].pi_name;
                        return (0);
                }
index a1fe9d32afa7f93b7c5e413ecbdaef6fc267960d..d864682024026ca44deaf837949f6430daf2ad73 100644 (file)
@@ -184,7 +184,7 @@ dmu_bonus_hold(objset_t *os, uint64_t object, void *tag, dmu_buf_t **dbp)
  */
 static int
 dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
-    int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp, uint32_t flags)
+    int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp, uint32_t flags)
 {
        dsl_pool_t *dp = NULL;
        dmu_buf_t **dbp;
@@ -235,7 +235,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
                        return (EIO);
                }
                /* initiate async i/o */
-               if (rd) {
+               if (read) {
                        (void) dbuf_read(db, zio, dbuf_flags);
                }
                dbp[i] = &db->db;
@@ -253,7 +253,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
        }
 
        /* wait for other io to complete */
-       if (rd) {
+       if (read) {
                for (i = 0; i < nblks; i++) {
                        dmu_buf_impl_t *db = (dmu_buf_impl_t *)dbp[i];
                        mutex_enter(&db->db_mtx);
@@ -277,7 +277,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
 
 static int
 dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
-    uint64_t length, int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
+    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
 {
        dnode_t *dn;
        int err;
@@ -286,7 +286,7 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
        if (err)
                return (err);
 
-       err = dmu_buf_hold_array_by_dnode(dn, offset, length, rd, tag,
+       err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
            numbufsp, dbpp, DMU_READ_PREFETCH);
 
        dnode_rele(dn, FTAG);
@@ -296,12 +296,12 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
 
 int
 dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
-    uint64_t length, int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
+    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
 {
        dnode_t *dn = ((dmu_buf_impl_t *)db)->db_dnode;
        int err;
 
-       err = dmu_buf_hold_array_by_dnode(dn, offset, length, rd, tag,
+       err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
            numbufsp, dbpp, DMU_READ_PREFETCH);
 
        return (err);
index c344202c564528fea6380ca973822956fec125e7..5a9d25b774c9e3c6a5c7655645c1f3e4e4c34d50 100644 (file)
@@ -1172,11 +1172,11 @@ dmu_objset_fsid_guid(objset_t *os)
 }
 
 void
-dmu_objset_fast_stat(objset_t *os, dmu_objset_stats_t *st)
+dmu_objset_fast_stat(objset_t *os, dmu_objset_stats_t *stat)
 {
-       st->dds_type = os->os->os_phys->os_type;
+       stat->dds_type = os->os->os_phys->os_type;
        if (os->os->os_dsl_dataset)
-               dsl_dataset_fast_stat(os->os->os_dsl_dataset, st);
+               dsl_dataset_fast_stat(os->os->os_dsl_dataset, stat);
 }
 
 void
index b977a2ff7ceac4a6e566fa356168e0b7ee30cf63..ce59aac5088f91d71aade2b7df0efbec9fa7e978 100644 (file)
@@ -901,28 +901,6 @@ restore_free(struct restorearg *ra, objset_t *os,
        return (err);
 }
 
-/*
- * Compute checksum of drr_begin record
- */
-static void
-dmu_recv_stream_cksum(dmu_recv_cookie_t *drc, struct restorearg *ra)
-{
-       dmu_replay_record_t *drr;
-
-       drr = kmem_zalloc(sizeof (dmu_replay_record_t), KM_SLEEP);
-
-       drr->drr_type = DRR_BEGIN;
-       drr->drr_u.drr_begin = *drc->drc_drrb;
-       if (ra->byteswap) {
-               fletcher_4_incremental_byteswap(drr,
-                   sizeof (dmu_replay_record_t), &(ra->cksum));
-       } else {
-               fletcher_4_incremental_native(drr,
-                   sizeof (dmu_replay_record_t), &(ra->cksum));
-       }
-       kmem_free(drr, sizeof (dmu_replay_record_t));
-}
-
 /*
  * NB: callers *must* call dmu_recv_end() if this succeeds.
  */
@@ -937,7 +915,22 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, vnode_t *vp, offset_t *voffp)
        if (drc->drc_drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC))
                ra.byteswap = TRUE;
 
-       dmu_recv_stream_cksum(drc, &ra);
+       {
+               /* compute checksum of drr_begin record */
+               dmu_replay_record_t *drr;
+               drr = kmem_zalloc(sizeof (dmu_replay_record_t), KM_SLEEP);
+
+               drr->drr_type = DRR_BEGIN;
+               drr->drr_u.drr_begin = *drc->drc_drrb;
+               if (ra.byteswap) {
+                       fletcher_4_incremental_byteswap(drr,
+                           sizeof (dmu_replay_record_t), &ra.cksum);
+               } else {
+                       fletcher_4_incremental_native(drr,
+                           sizeof (dmu_replay_record_t), &ra.cksum);
+               }
+               kmem_free(drr, sizeof (dmu_replay_record_t));
+       }
 
        if (ra.byteswap) {
                struct drr_begin *drrb = drc->drc_drrb;
index d39b4d4b3e8e33caf21c52b11dd8d2fbe59363a3..4d79fe98e17ee6125b9b4522e7ac95c3fbca18e2 100644 (file)
@@ -411,7 +411,7 @@ top:
 
        if (zs) {
                if (reset) {
-                       zstream_t *rm = zs;
+                       zstream_t *remove = zs;
 
                        rc = 0;
                        mutex_exit(&zs->zst_lock);
@@ -423,7 +423,7 @@ top:
                         */
                        for (zs = list_head(&zf->zf_stream); zs;
                            zs = list_next(&zf->zf_stream, zs)) {
-                               if (zs == rm) {
+                               if (zs == remove) {
                                        dmu_zfetch_stream_remove(zf, zs);
                                        mutex_destroy(&zs->zst_lock);
                                        kmem_free(zs, sizeof (zstream_t));
index 6e55d7e02db3d7a4f0860af3229b5c436ea23773..d82e72a1486bc1c07348c2b6dd9a7bca0c6362bf 100644 (file)
@@ -611,10 +611,10 @@ dnode_hold_impl(objset_impl_t *os, uint64_t object, int flag,
        }
 
        if ((dn = children_dnodes[idx]) == NULL) {
-               dnode_phys_t *dnpp = (dnode_phys_t *)db->db.db_data+idx;
+               dnode_phys_t *dnp = (dnode_phys_t *)db->db.db_data+idx;
                dnode_t *winner;
 
-               dn = dnode_create(os, dnpp, db, object);
+               dn = dnode_create(os, dnp, db, object);
                winner = atomic_cas_ptr(&children_dnodes[idx], NULL, dn);
                if (winner != NULL) {
                        dnode_destroy(dn);
index d87b053ed69cbd4c1b050416668a401f8d02cb8f..e3c0e2a134239eb05cd9f4c98c0574f49dfcc670 100644 (file)
@@ -154,12 +154,12 @@ txg_thread_exit(tx_state_t *tx, callb_cpr_t *cpr, kthread_t **tpp)
 }
 
 static void
-txg_thread_wait(tx_state_t *tx, callb_cpr_t *cpr, kcondvar_t *cv, uint64_t wt)
+txg_thread_wait(tx_state_t *tx, callb_cpr_t *cpr, kcondvar_t *cv, uint64_t time)
 {
        CALLB_CPR_SAFE_BEGIN(cpr);
 
-       if (wt)
-               (void) cv_timedwait(cv, &tx->tx_sync_lock, lbolt + wt);
+       if (time)
+               (void) cv_timedwait(cv, &tx->tx_sync_lock, lbolt + time);
        else
                cv_wait(cv, &tx->tx_sync_lock);
 
index 0b2ba784675b9b73e2660f7e7d312ad564d13304..b3074173e09ccf27094d7924148bd0bbd2c3f1c5 100644 (file)
@@ -1506,7 +1506,7 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
        void *orig[VDEV_RAIDZ_MAXPARITY];
        int tstore[VDEV_RAIDZ_MAXPARITY + 2];
        int *tgts = &tstore[1];
-       int curr, next, i, c, n;
+       int current, next, i, c, n;
        int code, ret = 0;
 
        ASSERT(total_errors < rm->rm_firstdatacol);
@@ -1554,12 +1554,12 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
 
                orig[n - 1] = zio_buf_alloc(rm->rm_col[0].rc_size);
 
-               curr = 0;
-               next = tgts[curr];
+               current = 0;
+               next = tgts[current];
 
-               while (curr != n) {
-                       tgts[curr] = next;
-                       curr = 0;
+               while (current != n) {
+                       tgts[current] = next;
+                       current = 0;
 
                        /*
                         * Save off the original data that we're going to
@@ -1606,34 +1606,34 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
 
                        do {
                                /*
-                                * Find the next valid column after the curr
+                                * Find the next valid column after the current
                                 * position..
                                 */
-                               for (next = tgts[curr] + 1;
+                               for (next = tgts[current] + 1;
                                    next < rm->rm_cols &&
                                    rm->rm_col[next].rc_error != 0; next++)
                                        continue;
 
-                               ASSERT(next <= tgts[curr + 1]);
+                               ASSERT(next <= tgts[current + 1]);
 
                                /*
                                 * If that spot is available, we're done here.
                                 */
-                               if (next != tgts[curr + 1])
+                               if (next != tgts[current + 1])
                                        break;
 
                                /*
                                 * Otherwise, find the next valid column after
                                 * the previous position.
                                 */
-                               for (c = tgts[curr - 1] + 1;
+                               for (c = tgts[current - 1] + 1;
                                    rm->rm_col[c].rc_error != 0; c++)
                                        continue;
 
-                               tgts[curr] = c;
-                               curr++;
+                               tgts[current] = c;
+                               current++;
 
-                       } while (curr != n);
+                       } while (current != n);
                }
        }
        n--;