From a92ec148bd1a847aa7eb9ce771058fe43b9a1865 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 21 Oct 2014 00:11:50 +0200 Subject: [PATCH] Rename more local index variables --- compat/compat.c | 16 ++++++++-------- performance.c | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compat/compat.c b/compat/compat.c index 3b2dc1e25b..d5535e1ec9 100644 --- a/compat/compat.c +++ b/compat/compat.c @@ -45,11 +45,11 @@ static bool is_long_option(const char *str) static int find_short_index(char * const *argv) { - int index; - for (index = 0; argv[index]; index++) + int idx; + for (idx = 0; argv[idx]; idx++) { - if (is_short_option(argv[index])) - return index; + if (is_short_option(argv[idx])) + return idx; } return -1; @@ -57,11 +57,11 @@ static int find_short_index(char * const *argv) static int find_long_index(char * const *argv) { - int index; - for (index = 0; argv[index]; index++) + int idx; + for (idx = 0; argv[idx]; idx++) { - if (is_long_option(argv[index])) - return index; + if (is_long_option(argv[idx])) + return idx; } return -1; diff --git a/performance.c b/performance.c index 76ec142271..58c6b90add 100644 --- a/performance.c +++ b/performance.c @@ -272,7 +272,7 @@ static void x86_cpuid(int func, int flags[4]) } /* Only runs on i686 and above. Needs to be conditionally run. */ -static uint64_t xgetbv_x86(uint32_t index) +static uint64_t xgetbv_x86(uint32_t idx) { #if defined(__GNUC__) uint32_t eax, edx; @@ -282,11 +282,11 @@ static uint64_t xgetbv_x86(uint32_t index) * Stamp out the machine code directly. */ ".byte 0x0f, 0x01, 0xd0\n" - : "=a"(eax), "=d"(edx) : "c"(index)); + : "=a"(eax), "=d"(edx) : "c"(idx)); return ((uint64_t)edx << 32) | eax; #elif _MSC_FULL_VER >= 160040219 /* Intrinsic only works on 2010 SP1 and above. */ - return _xgetbv(index); + return _xgetbv(idx); #else RARCH_WARN("Unknown compiler. Cannot check xgetbv bits.\n"); return 0;