diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-06-02 14:59:23 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-06-02 15:06:55 +0200 |
commit | 7b97c8a8307ce1c20af0dcfa09ac9ee7a8d3350f (patch) | |
tree | e81553b4bf28ac325bd3eda23b11574a028f1846 | |
parent | a43297d6c71b3bf13309ab421abf0c737972608c (diff) |
don't use for loop variable declarations
-rw-r--r-- | tests/wocky-test-sasl-auth.c | 3 | ||||
-rw-r--r-- | 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; |