aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/n3.c b/src/n3.c
index cd6b6de6..f1d04206 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -384,7 +384,7 @@ read_STRING_LITERAL(SerdReader* const reader,
{
SerdStatus st = SERD_SUCCESS;
- while (!(st && reader->strict)) {
+ while (!st || !reader->strict) {
const int c = peek_byte(reader);
uint32_t code = 0;
switch (c) {
@@ -405,15 +405,14 @@ read_STRING_LITERAL(SerdReader* const reader,
if (c == q) {
eat_byte_check(reader, q);
return SERD_SUCCESS;
- } else {
- st =
- read_character(reader, ref, flags, (uint8_t)eat_byte_safe(reader, c));
}
+
+ st =
+ read_character(reader, ref, flags, (uint8_t)eat_byte_safe(reader, c));
}
}
- return st ? st
- : (eat_byte_check(reader, q) ? SERD_SUCCESS : SERD_ERR_BAD_SYNTAX);
+ return eat_byte_check(reader, q) ? SERD_SUCCESS : SERD_ERR_BAD_SYNTAX;
}
static SerdStatus