Declare counter var inside loop

We require c99/gnu99 anyways.
This commit is contained in:
Michael Vetter
2020-11-09 11:03:54 +01:00
parent 304f63f204
commit 35aecd425f
22 changed files with 94 additions and 163 deletions

View File

@@ -123,7 +123,7 @@ api_register_command(const char* const plugin_name, const char* command_name, in
help->tags[0] = NULL;
int i = 0;
int i;
for (i = 0; synopsis[i] != NULL; i++) {
help->synopsis[i] = strdup(synopsis[i]);
}

View File

@@ -84,8 +84,7 @@ plugins_init(void)
// load plugins
gchar** plugins_pref = prefs_get_plugins();
if (plugins_pref) {
int i;
for (i = 0; i < g_strv_length(plugins_pref); i++) {
for (int i = 0; i < g_strv_length(plugins_pref); i++) {
gboolean loaded = FALSE;
gchar* filename = plugins_pref[i];
#ifdef HAVE_PYTHON