about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-07-22 13:56:03 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-07-22 14:02:33 +0200
commite75cc411641b8eb24c28ef0ebb449542467ed622 (patch)
treeda444bfbfca09e34fe6ed58f9e86d05950237881 /src
parent16174727f48daae6d244835452139e0a1b1cb389 (diff)
downloadprofani-tty-e75cc411641b8eb24c28ef0ebb449542467ed622.tar.gz
Fix double initialization of loop iterator
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_defs.c1
-rw-r--r--src/plugins/python_api.c2
2 files changed, 0 insertions, 3 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 2dca64c0..efe2bad0 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -2427,7 +2427,6 @@ _cmd_index(Command *cmd) {
     g_string_free(index_source, TRUE);
 
     GString *index = g_string_new("");
-    i = 0;
     for (i = 0; i < g_strv_length(tokens); i++) {
         index = g_string_append(index, tokens[i]);
         index = g_string_append(index, " ");
diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c
index 99a96634..140b4abd 100644
--- a/src/plugins/python_api.c
+++ b/src/plugins/python_api.c
@@ -159,7 +159,6 @@ python_api_register_command(PyObject *self, PyObject *args)
 
         Py_ssize_t args_len = PyList_Size(arguments);
         char *c_arguments[args_len == 0 ? 0 : args_len+1][2];
-        i = 0;
         for (i = 0; i < args_len; i++) {
             PyObject *item = PyList_GetItem(arguments, i);
             Py_ssize_t len2 = PyList_Size(item);
@@ -180,7 +179,6 @@ python_api_register_command(PyObject *self, PyObject *args)
 
         len = PyList_Size(examples);
         char *c_examples[len == 0 ? 0 : len+1];
-        i = 0;
         for (i = 0; i < len; i++) {
             PyObject *item = PyList_GetItem(examples, i);
             char *c_item = python_str_or_unicode_to_string(item);