aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-28 12:12:09 -0400
committerDavid Robillard <d@drobilla.net>2023-04-05 09:45:15 -0400
commit4ba5b0942a744509e8345cc160ff2c16d1fc587f (patch)
treedec23f3d07318ad4fb305205411c734c294b6259 /src
parentbd2d7f510576c2185ddb0e9b8872079dba2a05c7 (diff)
downloadserd-4ba5b0942a744509e8345cc160ff2c16d1fc587f.tar.gz
serd-4ba5b0942a744509e8345cc160ff2c16d1fc587f.tar.bz2
serd-4ba5b0942a744509e8345cc160ff2c16d1fc587f.zip
Use conventional status variable name
Diffstat (limited to 'src')
-rw-r--r--src/n3.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/n3.c b/src/n3.c
index e14cb8ce..48a7aba0 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1135,7 +1135,7 @@ read_object(SerdReader* const reader,
const size_t orig_stack_size = reader->stack.size;
#endif
- SerdStatus ret = SERD_FAILURE;
+ SerdStatus st = SERD_FAILURE;
bool simple = (ctx->subject != 0);
SerdNode* node = NULL;
@@ -1161,18 +1161,18 @@ read_object(SerdReader* const reader,
return r_err(reader, SERD_ERR_BAD_SYNTAX, "expected object\n");
case '[':
simple = false;
- ret = read_anon(reader, *ctx, false, &o);
+ st = read_anon(reader, *ctx, false, &o);
break;
case '(':
simple = false;
- ret = read_collection(reader, *ctx, &o);
+ st = read_collection(reader, *ctx, &o);
break;
case '_':
- ret = read_BLANK_NODE_LABEL(reader, &o, ate_dot);
+ st = read_BLANK_NODE_LABEL(reader, &o, ate_dot);
break;
case '<':
case ':':
- ret = read_iri(reader, &o, ate_dot);
+ st = read_iri(reader, &o, ate_dot);
break;
case '+':
case '-':
@@ -1187,11 +1187,11 @@ read_object(SerdReader* const reader,
case '7':
case '8':
case '9':
- ret = read_number(reader, &o, &datatype, ate_dot);
+ st = read_number(reader, &o, &datatype, ate_dot);
break;
case '\"':
case '\'':
- ret = read_literal(reader, &o, &datatype, &lang, &flags, ate_dot);
+ st = read_literal(reader, &o, &datatype, &lang, &flags, ate_dot);
break;
default:
/* Either a boolean literal, or a qname. Read the prefix first, and if
@@ -1205,25 +1205,25 @@ read_object(SerdReader* const reader,
(node->n_bytes == 5 && !memcmp(node->buf, "false", 5))) {
node->type = SERD_LITERAL;
datatype = push_node(reader, SERD_URI, XSD_BOOLEAN, XSD_BOOLEAN_LEN);
- ret = SERD_SUCCESS;
+ st = SERD_SUCCESS;
} else if (read_PN_PREFIX_tail(reader, o) > SERD_FAILURE) {
- ret = SERD_ERR_BAD_SYNTAX;
+ st = SERD_ERR_BAD_SYNTAX;
} else {
- if ((ret = read_PrefixedName(reader, o, false, ate_dot))) {
- ret = ret > SERD_FAILURE ? ret : SERD_ERR_BAD_SYNTAX;
+ if ((st = read_PrefixedName(reader, o, false, ate_dot))) {
+ st = st > SERD_FAILURE ? st : SERD_ERR_BAD_SYNTAX;
pop_node(reader, o);
- return r_err(reader, ret, "expected prefixed name\n");
+ return r_err(reader, st, "expected prefixed name\n");
}
}
}
- if (!ret && simple && o) {
+ if (!st && simple && o) {
deref(reader, o)->flags = flags;
}
- if (!ret && emit && simple) {
- ret = emit_statement(reader, *ctx, o, datatype, lang);
- } else if (!ret && !emit) {
+ if (!st && emit && simple) {
+ st = emit_statement(reader, *ctx, o, datatype, lang);
+ } else if (!st && !emit) {
ctx->object = o;
ctx->datatype = datatype;
ctx->lang = lang;
@@ -1236,7 +1236,7 @@ read_object(SerdReader* const reader,
#ifndef NDEBUG
assert(reader->stack.size == orig_stack_size);
#endif
- return ret;
+ return st;
}
static SerdStatus