From cd092460c1b288eb39c36f1a3a3b78a3d088c559 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 6 Aug 2012 19:28:20 +0100 Subject: [PATCH 4/5] This is not C++, hoist declaration to the beginning --- ytstenut/yts-client-status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ytstenut/yts-client-status.c b/ytstenut/yts-client-status.c index a23e125..eae4ef6 100644 --- a/ytstenut/yts-client-status.c +++ b/ytstenut/yts-client-status.c @@ -252,6 +252,7 @@ yts_client_status_set (YtsClientStatus *self, YtsClientStatusPrivate *priv = GET_PRIVATE (self); GString *attribs_str; char *status_xml; + unsigned i; g_return_val_if_fail (YTS_IS_CLIENT_STATUS (self), NULL); g_return_val_if_fail (capability, NULL); @@ -260,7 +261,7 @@ yts_client_status_set (YtsClientStatus *self, NULL); attribs_str = g_string_new (""); - for (unsigned i = 0; attribs && attribs[i] && attribs[i+1]; i += 2) { + for (i = 0; attribs && attribs[i] && attribs[i+1]; i += 2) { g_string_append_printf (attribs_str, "%s='%s' ", attribs[i], attribs[i+1]); } -- 1.7.10.4