[PATCH] parse-xml.c: Fix a warning about missing braces

Lubomir I. Ivanov neolit123 at gmail.com
Sun Feb 9 13:00:33 UTC 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

warning: suggest explicit braces to avoid ambiguous 'else'

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 parse-xml.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/parse-xml.c b/parse-xml.c
index 111075b..1d88ab6 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1929,11 +1929,12 @@ static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params, char **err
 	char *attribute;
 
 	while (info->root) {
-		if ((strcasecmp(root_element->name, info->root) == 0))
+		if ((strcasecmp(root_element->name, info->root) == 0)) {
 			if (info->attribute == NULL)
 				break;
 			else if (xmlGetProp(root_element, info->attribute) != NULL)
 				break;
+		}
 		info++;
 	}
 
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list