From 2f666ee34fb414f43def75c1caa1243feb349f8d Mon Sep 17 00:00:00 2001 From: Jonas Ådahl Date: Wed, 4 Nov 2015 12:40:54 +0800 Subject: scanner: Add missing brackets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A statement was added at the same indentation level as the true branch of the if statement, but since there were no brackets, it would be executed independently of the result of the if condition. Signed-off-by: Jonas Ådahl Reviewed-by: Daniel Stone Reviewed-by: Marek Chalupa Reviewed-by: Derek Foreman --- src/scanner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/scanner.c b/src/scanner.c index 406519f..3f79a44 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -612,10 +612,11 @@ start_element(void *data, const char *element_name, const char **atts) for (i = 0; atts[i]; i += 2) { if (strcmp(atts[i], "name") == 0) name = atts[i + 1]; - if (strcmp(atts[i], "version") == 0) + if (strcmp(atts[i], "version") == 0) { version = strtouint(atts[i + 1]); if (version == -1) fail(&ctx->loc, "wrong version (%s)", atts[i + 1]); + } if (strcmp(atts[i], "type") == 0) type = atts[i + 1]; if (strcmp(atts[i], "value") == 0) -- cgit v1.2.3-70-g09d2