diff mbox

[PULL,1/2] monitor: fix debug print compiling error

Message ID 1410553584-25048-2-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino Sept. 12, 2014, 8:26 p.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

error: 'i' undeclared (first use in this function)

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 34cee74..667efb7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4747,8 +4747,11 @@  static void monitor_find_completion(void *opaque,
         return;
     }
 #ifdef DEBUG_COMPLETION
-    for (i = 0; i < nb_args; i++) {
-        monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
+    {
+        int i;
+        for (i = 0; i < nb_args; i++) {
+            monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
+        }
     }
 #endif