aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-15 20:02:09 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit2e4f78fcee15cb7cf76722c8fd0d1b18a4d8afbf (patch)
treea726b8b966f9b4a11b266dbf4f68a4d9f631f56b /src
parent99b1953f6c227173c7a6b6360ee9a670ad677645 (diff)
downloadserd-2e4f78fcee15cb7cf76722c8fd0d1b18a4d8afbf.tar.gz
serd-2e4f78fcee15cb7cf76722c8fd0d1b18a4d8afbf.tar.bz2
serd-2e4f78fcee15cb7cf76722c8fd0d1b18a4d8afbf.zip
Remove unnecessary parameter
Diffstat (limited to 'src')
-rw-r--r--src/n3.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/n3.c b/src/n3.c
index 2b1ef166..edf26089 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -610,26 +610,27 @@ read_PN_PREFIX(SerdReader* reader, SerdNode* dest)
}
static SerdStatus
-read_LANGTAG(SerdReader* reader, SerdNode** dest)
+read_LANGTAG(SerdReader* reader)
{
int c = peek_byte(reader);
if (!is_alpha(c)) {
return r_err(reader, SERD_ERR_BAD_SYNTAX, "unexpected `%c'\n", c);
}
- if (!(*dest = push_node(reader, SERD_LITERAL, "", 0))) {
+ SerdNode* node = push_node(reader, SERD_LITERAL, "", 0);
+ if (!node) {
return SERD_ERR_OVERFLOW;
}
SerdStatus st = SERD_SUCCESS;
- TRY(st, push_byte(reader, *dest, eat_byte_safe(reader, c)));
+ TRY(st, push_byte(reader, node, eat_byte_safe(reader, c)));
while ((c = peek_byte(reader)) && is_alpha(c)) {
- TRY(st, push_byte(reader, *dest, eat_byte_safe(reader, c)));
+ TRY(st, push_byte(reader, node, eat_byte_safe(reader, c)));
}
while (peek_byte(reader) == '-') {
- TRY(st, push_byte(reader, *dest, eat_byte_safe(reader, '-')));
+ TRY(st, push_byte(reader, node, eat_byte_safe(reader, '-')));
while ((c = peek_byte(reader)) && (is_alpha(c) || is_digit(c))) {
- TRY(st, push_byte(reader, *dest, eat_byte_safe(reader, c)));
+ TRY(st, push_byte(reader, node, eat_byte_safe(reader, c)));
}
}
return SERD_SUCCESS;
@@ -849,12 +850,11 @@ read_literal(SerdReader* reader, SerdNode** dest, bool* ate_dot)
}
SerdNode* datatype = NULL;
- SerdNode* lang = NULL;
switch (peek_byte(reader)) {
case '@':
eat_byte_safe(reader, '@');
(*dest)->flags |= SERD_HAS_LANGUAGE;
- if ((st = read_LANGTAG(reader, &lang))) {
+ if ((st = read_LANGTAG(reader))) {
return r_err(reader, st, "bad literal\n");
}
break;