Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by:	dim
MFC after:	2 weeks
This commit is contained in:
Xin LI 2014-11-11 05:49:57 +00:00
parent 5ebb15b942
commit a31070e90d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274370

View File

@ -511,25 +511,25 @@ kvp_get_value(int pool, __u8 *key, int key_size, __u8 *value,
static int
kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size,
kvp_pool_enumerate(int pool, int idx, __u8 *key, int key_size,
__u8 *value, int value_size)
{
struct kvp_record *record;
KVP_LOG(LOG_DEBUG, "kvp_pool_enumerate: pool = %d, index = %d\n,",
pool, index);
pool, idx);
/* First update our in-memory state first. */
kvp_update_mem_state(pool);
record = kvp_pools[pool].records;
/* Index starts with 0 */
if (index >= kvp_pools[pool].num_records) {
if (idx >= kvp_pools[pool].num_records) {
return (1);
}
memcpy(key, record[index].key, key_size);
memcpy(value, record[index].value, value_size);
memcpy(key, record[idx].key, key_size);
memcpy(value, record[idx].value, value_size);
return (0);
}