diff options
| author | Jonas Ådahl <jadahl@gmail.com> | 2015-11-04 12:40:54 +0800 |
|---|---|---|
| committer | Jonas Ådahl <jadahl@gmail.com> | 2016-01-12 12:05:47 +0800 |
| commit | 2f666ee34fb414f43def75c1caa1243feb349f8d (patch) | |
| tree | 4522acab462362eca7f23844c77e52baf2632980 /src | |
| parent | server: Add a socket with an existing fd (diff) | |
| download | wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar.gz wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar.bz2 wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar.lz wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar.xz wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.tar.zst wayland-2f666ee34fb414f43def75c1caa1243feb349f8d.zip | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/scanner.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |
