scanner: Add missing brackets

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 <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Jonas Ådahl 2015-11-04 12:40:54 +08:00
parent 225830dcb8
commit 2f666ee34f

View file

@ -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)