aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-09-27 18:55:27 -0400
committerDavid Robillard <d@drobilla.net>2024-09-27 18:55:27 -0400
commit51a4acc55b233658501eacdcaf88c1f9917e0576 (patch)
tree8069e2c3408497b41a27de0d73b605a9595aa23a
parent57032cb1c06a24554586552abdb75530a7806849 (diff)
downloadserd-51a4acc55b233658501eacdcaf88c1f9917e0576.tar.gz
serd-51a4acc55b233658501eacdcaf88c1f9917e0576.tar.bz2
serd-51a4acc55b233658501eacdcaf88c1f9917e0576.zip
Reorder branch to avoid redundant assignment
Well, to make it obvious to cppcheck that it's not redundant, anyway.
-rw-r--r--src/n3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/n3.c b/src/n3.c
index 460e0e9d..b0c958e2 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -740,12 +740,12 @@ read_IRIREF(SerdReader* const reader, Ref* const dest)
SERD_ERR_BAD_SYNTAX,
"invalid IRI character (escape %%%02X)\n",
(unsigned)c);
- if (reader->strict) {
+ if (!reader->strict) {
+ st = SERD_FAILURE;
+ push_byte(reader, *dest, c);
+ } else {
break;
}
-
- st = SERD_FAILURE;
- push_byte(reader, *dest, c);
} else if (!(c & 0x80)) {
push_byte(reader, *dest, c);
} else if (read_utf8_character(reader, *dest, (uint8_t)c)) {