diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 10 | ||||
-rw-r--r-- | src/reader.c | 4 | ||||
-rw-r--r-- | src/writer.c | 4 |
3 files changed, 9 insertions, 9 deletions
@@ -925,10 +925,10 @@ read_verb(SerdReader* const reader, Ref* const dest) */ *dest = push_node(reader, SERD_CURIE, "", 0); - SerdStatus st = read_PN_PREFIX(reader, *dest); - bool ate_dot = false; - SerdNode* node = deref(reader, *dest); - const int next = peek_byte(reader); + SerdStatus st = read_PN_PREFIX(reader, *dest); + bool ate_dot = false; + const SerdNode* const node = deref(reader, *dest); + const int next = peek_byte(reader); if (!st && node->n_bytes == 1 && node->buf[0] == 'a' && next != ':' && !is_PN_CHARS_BASE((uint32_t)next)) { pop_node(reader, *dest); @@ -1540,7 +1540,7 @@ token_equals(SerdReader* const reader, const char* const tok, const size_t n) { - SerdNode* const node = deref(reader, ref); + const SerdNode* const node = deref(reader, ref); if (!node || node->n_bytes != n) { return false; } diff --git a/src/reader.c b/src/reader.c index aa24a9ca..5cd978bf 100644 --- a/src/reader.c +++ b/src/reader.c @@ -127,8 +127,8 @@ pop_node(SerdReader* const reader, const Ref ref) SERD_STACK_ASSERT_TOP(reader, ref); --reader->n_allocs; #endif - SerdNode* const node = deref(reader, ref); - uint8_t* const top = reader->stack.buf + reader->stack.size; + SerdNode* const node = deref(reader, ref); + const uint8_t* const top = reader->stack.buf + reader->stack.size; serd_stack_pop_aligned(&reader->stack, (size_t)(top - (uint8_t*)node)); } return 0; diff --git a/src/writer.c b/src/writer.c index 0df44797..3905cb9c 100644 --- a/src/writer.c +++ b/src/writer.c @@ -745,8 +745,8 @@ write_uri_node(SerdWriter* const writer, serd_uri_parse(node->buf, &uri); SERD_RESTORE_WARNINGS serd_uri_resolve(&uri, &in_base_uri, &abs_uri); - bool rooted = uri_is_under(&writer->base_uri, &writer->root_uri); - SerdURI* root = rooted ? &writer->root_uri : &writer->base_uri; + const bool rooted = uri_is_under(&writer->base_uri, &writer->root_uri); + const SerdURI* root = rooted ? &writer->root_uri : &writer->base_uri; UriSinkContext ctx = {writer, SERD_SUCCESS}; if (!uri_is_under(&abs_uri, root) || writer->syntax == SERD_NTRIPLES || writer->syntax == SERD_NQUADS) { |