diff options
author | David Robillard <d@drobilla.net> | 2016-03-15 23:37:09 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:03 +0200 |
commit | 73de48faf2f11c1c3814fb73ff2faedfe2e15d22 (patch) | |
tree | 1ec9bb3c112b5fb0fa7500dc5648a8bc2e55366c /src/env.c | |
parent | 3c3c2d4d4979eb2094d4d629dc052e15aede9b91 (diff) | |
download | serd-73de48faf2f11c1c3814fb73ff2faedfe2e15d22.tar.gz serd-73de48faf2f11c1c3814fb73ff2faedfe2e15d22.tar.bz2 serd-73de48faf2f11c1c3814fb73ff2faedfe2e15d22.zip |
Remove useless character counting
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -216,9 +216,8 @@ serd_env_expand_node(const SerdEnv* env, } const size_t len = prefix.len + suffix.len; uint8_t* buf = (uint8_t*)malloc(len + 1); - SerdNode ret = { buf, len, 0, 0, SERD_URI }; - snprintf((char*)buf, len + 1, "%s%s", prefix.buf, suffix.buf); - ret.n_chars = serd_strlen(buf, NULL, NULL); + SerdNode ret = { buf, len, 0, SERD_URI }; + snprintf((char*)buf, ret.n_bytes + 1, "%s%s", prefix.buf, suffix.buf); return ret; } case SERD_URI: { |