From 51a4acc55b233658501eacdcaf88c1f9917e0576 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Sep 2024 18:55:27 -0400 Subject: Reorder branch to avoid redundant assignment Well, to make it obvious to cppcheck that it's not redundant, anyway. --- src/n3.c | 8 ++++---- 1 file 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)) { -- cgit v1.2.1