From 7b97c8a8307ce1c20af0dcfa09ac9ee7a8d3350f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 2 Jun 2014 14:59:23 +0200 Subject: don't use for loop variable declarations --- tests/wocky-test-sasl-auth.c | 3 ++- wocky/wocky-openssl.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/wocky-test-sasl-auth.c b/tests/wocky-test-sasl-auth.c index ea956bf..166f232 100644 --- a/tests/wocky-test-sasl-auth.c +++ b/tests/wocky-test-sasl-auth.c @@ -270,6 +270,7 @@ main (int argc, char **argv) { int result; + guint i; test_t tests[] = { SUCCESS("/xmpp-sasl/normal-auth", NULL, TRUE), SUCCESS("/xmpp-sasl/no-plain", NULL, FALSE), @@ -335,7 +336,7 @@ main (int argc, mainloop = g_main_loop_new (NULL, FALSE); - for (guint i = 0; i < G_N_ELEMENTS (tests); i++) + for (i = 0; i < G_N_ELEMENTS (tests); i++) g_test_add_data_func (tests[i].description, &tests[i], run_test); diff --git a/wocky/wocky-openssl.c b/wocky/wocky-openssl.c index d1b5fd3..2201213 100644 --- a/wocky/wocky-openssl.c +++ b/wocky/wocky-openssl.c @@ -1013,6 +1013,7 @@ wocky_tls_session_get_peers_certificate (WockyTLSSession *session, STACK_OF(X509) *cert_chain = NULL; guint cls = 0; GPtrArray *certificates; + guint i; certificates = g_ptr_array_new_with_free_func ((GDestroyNotify) g_array_unref); @@ -1027,7 +1028,7 @@ wocky_tls_session_get_peers_certificate (WockyTLSSession *session, cls = sk_X509_num (cert_chain); - for (guint i = 0; i < cls; i++) + for (i = 0; i < cls; i++) { GArray *certificate; X509 *peer; -- cgit v1.2.3