telepathy-idle: idle_debug_init: don't make a semicolon have side-effects

Simon McVittie smcv at kemper.freedesktop.org
Wed May 30 05:08:46 PDT 2012


Module: telepathy-idle
Branch: master
Commit: 263707940384faff5133c322a75ef5036a6362f5
URL:    http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=263707940384faff5133c322a75ef5036a6362f5

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu May 10 14:17:40 2012 +0100

idle_debug_init: don't make a semicolon have side-effects

I really don't like that style. gcc didn't warn about it, but IMO
it should...

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>

---

 src/idle-debug.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/idle-debug.c b/src/idle-debug.c
index 11969d3..156dc3b 100644
--- a/src/idle-debug.c
+++ b/src/idle-debug.c
@@ -41,7 +41,9 @@ idle_debug_init (void) {
 	const gchar *flags_string = g_getenv("IDLE_DEBUG");
 	guint nkeys;
 
-	for (nkeys = 0; _keys[nkeys].value; nkeys++);
+	for (nkeys = 0; _keys[nkeys].value; nkeys++) {
+		/* do nothing, just count nkeys */
+	}
 
 	if (flags_string) {
 		tp_debug_set_flags(flags_string);



More information about the telepathy-commits mailing list