summaryrefslogtreecommitdiffstatshomepage
path: root/py/repl.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-29 01:01:48 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-29 01:01:48 +0100
commitf27aa27a0c91dac8f3abe300c5de2c01342fd20d (patch)
tree422155dc5b71bbb0934fe21f22041ba789c2ff97 /py/repl.c
parenta1a2c411b25bc5a709f719a8a955727f9d6e228f (diff)
downloadmicropython-f27aa27a0c91dac8f3abe300c5de2c01342fd20d.tar.gz
micropython-f27aa27a0c91dac8f3abe300c5de2c01342fd20d.zip
py/repl.c: Fix shadowing of local variable "i".
Diffstat (limited to 'py/repl.c')
-rw-r--r--py/repl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/repl.c b/py/repl.c
index b03f0ed985..649ade161b 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -187,9 +187,9 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
match_str = d_str;
match_len = d_len;
} else {
- for (mp_uint_t i = s_len; i < match_len && i < d_len; ++i) {
- if (match_str[i] != d_str[i]) {
- match_len = i;
+ for (mp_uint_t j = s_len; j < match_len && j < d_len; ++j) {
+ if (match_str[j] != d_str[j]) {
+ match_len = j;
break;
}
}
@@ -227,7 +227,7 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
}
if (line_len + gap + d_len <= MAX_LINE_LEN) {
// TODO optimise printing of gap?
- for (int i = 0; i < gap; ++i) {
+ for (int j = 0; j < gap; ++j) {
mp_print_str(print, " ");
}
mp_print_str(print, d_str);