From ec624d7c5cbc69a1c91d552926a0f04016d12e50 Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefasab@gmail.com>
Date: Sun, 8 Jan 2012 10:40:11 +0100
Subject: [PATCH] ffprobe: use "%*" printf syntax in XML_INDENT() in place of a
 loop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Possibly faster/cleaner.

Suggested-By: Clément Bœsch <ubitux@gmail.com>
---
 ffprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffprobe.c b/ffprobe.c
index e0d015651cc..a76e98ee453 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1032,7 +1032,7 @@ static void xml_print_footer(WriterContext *wctx)
     printf("</%sffprobe>\n", xml->fully_qualified ? "ffprobe:" : "");
 }
 
-#define XML_INDENT() { int i; for (i = 0; i < xml->indent_level; i++) printf(INDENT); }
+#define XML_INDENT() printf("%*c", xml->indent_level * 4, ' ')
 
 static void xml_print_chapter_header(WriterContext *wctx, const char *chapter)
 {
-- 
GitLab