aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-03-15 23:37:09 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitd107eb486f24c0e68eff4e1b622850fca5f75d77 (patch)
treed8c2678be2739467005f5807f331ad4bcfa9790a /src/reader.c
parent1c59b863d8c2c2d7b5531866586baf232c0047a2 (diff)
downloadserd-d107eb486f24c0e68eff4e1b622850fca5f75d77.tar.gz
serd-d107eb486f24c0e68eff4e1b622850fca5f75d77.tar.bz2
serd-d107eb486f24c0e68eff4e1b622850fca5f75d77.zip
Remove useless character counting
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reader.c b/src/reader.c
index 5d87216d..0aa468a2 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -33,7 +33,7 @@ set_blank_id(SerdReader* const reader, const Ref ref, const size_t buf_size)
{
SerdNode* node = deref(reader, ref);
const char* prefix = reader->bprefix ? (const char*)reader->bprefix : "";
- node->n_bytes = node->n_chars = (size_t)snprintf(
+ node->n_bytes = (size_t)snprintf(
(char*)node->buf, buf_size, "%sb%u", prefix, reader->next_id++);
}
@@ -81,10 +81,10 @@ push_node_padded(SerdReader* const reader,
&reader->stack, sizeof(SerdNode) + maxlen + 1, sizeof(SerdNode));
SerdNode* const node = (SerdNode*)mem;
- node->n_bytes = node->n_chars = n_bytes;
- node->flags = 0;
- node->type = type;
- node->buf = NULL;
+ node->n_bytes = n_bytes;
+ node->flags = 0;
+ node->type = type;
+ node->buf = NULL;
uint8_t* buf = (uint8_t*)(node + 1);
memcpy(buf, str, n_bytes + 1);