about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-11-05 09:38:42 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-11-05 09:38:57 +0100
commit304f63f2041ce26788c327013b8b0c1b904f1044 (patch)
tree63dda3911bb28ecab87fa4c5fab75cdd198082ea
parente9a946f75e0dfb4ca2a80cff268084bf0d0368c1 (diff)
downloadprofani-tty-304f63f2041ce26788c327013b8b0c1b904f1044.tar.gz
Dont initialize i twice in accounts_get_account()
-rw-r--r--src/config/accounts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c
index 5539919b..3787d889 100644
--- a/src/config/accounts.c
+++ b/src/config/accounts.c
@@ -252,7 +252,7 @@ accounts_get_account(const char* const name)
         GList* otr_manual = NULL;
         gchar** manual = g_key_file_get_string_list(accounts, name, "otr.manual", &length, NULL);
         if (manual) {
-            int i = 0;
+            int i;
             for (i = 0; i < length; i++) {
                 otr_manual = g_list_append(otr_manual, strdup(manual[i]));
             }
@@ -262,7 +262,7 @@ accounts_get_account(const char* const name)
         GList* otr_opportunistic = NULL;
         gchar** opportunistic = g_key_file_get_string_list(accounts, name, "otr.opportunistic", &length, NULL);
         if (opportunistic) {
-            int i = 0;
+            int i;
             for (i = 0; i < length; i++) {
                 otr_opportunistic = g_list_append(otr_opportunistic, strdup(opportunistic[i]));
             }
@@ -272,7 +272,7 @@ accounts_get_account(const char* const name)
         GList* otr_always = NULL;
         gchar** always = g_key_file_get_string_list(accounts, name, "otr.always", &length, NULL);
         if (always) {
-            int i = 0;
+            int i;
             for (i = 0; i < length; i++) {
                 otr_always = g_list_append(otr_always, strdup(always[i]));
             }
@@ -287,7 +287,7 @@ accounts_get_account(const char* const name)
         GList* omemo_enabled = NULL;
         gchar** enabled_list = g_key_file_get_string_list(accounts, name, "omemo.enabled", &length, NULL);
         if (enabled_list) {
-            int i = 0;
+            int i;
             for (i = 0; i < length; i++) {
                 omemo_enabled = g_list_append(omemo_enabled, strdup(enabled_list[i]));
             }
@@ -297,7 +297,7 @@ accounts_get_account(const char* const name)
         GList* omemo_disabled = NULL;
         gchar** disabled_list = g_key_file_get_string_list(accounts, name, "omemo.disabled", &length, NULL);
         if (disabled_list) {
-            int i = 0;
+            int i;
             for (i = 0; i < length; i++) {
                 omemo_disabled = g_list_append(omemo_disabled, strdup(disabled_list[i]));
             }