Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 05:49:58 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274370 - head/contrib/hyperv/tools
Message-ID:  <201411110549.sAB5nw2k050683@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Nov 11 05:49:57 2014
New Revision: 274370
URL: https://svnweb.freebsd.org/changeset/base/274370

Log:
  Rename variable name from 'index' to 'idx' to avoid shadowing index(3).
  
  Noticed by:	dim
  MFC after:	2 weeks

Modified:
  head/contrib/hyperv/tools/hv_kvp_daemon.c

Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c
==============================================================================
--- head/contrib/hyperv/tools/hv_kvp_daemon.c	Tue Nov 11 05:49:35 2014	(r274369)
+++ head/contrib/hyperv/tools/hv_kvp_daemon.c	Tue Nov 11 05:49:57 2014	(r274370)
@@ -511,25 +511,25 @@ kvp_get_value(int pool, __u8 *key, int k
 
 
 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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411110549.sAB5nw2k050683>