summaryrefslogtreecommitdiffhomepage
path: root/stc/cstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'stc/cstr.h')
-rw-r--r--stc/cstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/stc/cstr.h b/stc/cstr.h
index 9c3d4f1c..8c29c9b3 100644
--- a/stc/cstr.h
+++ b/stc/cstr.h
@@ -260,7 +260,7 @@ uint32_t cstr_hash_raw(const char* const* p, size_t none) {
STC_DEF size_t
cstr_reserve(cstr_t* self, size_t cap) {
- size_t len = cstr_size(*self), oldcap = cstr_capacity(*self);
+ size_t oldcap = cstr_capacity(*self);
if (cap > oldcap) {
size_t* rep = (size_t *) c_realloc(oldcap ? _cstr_rep(self) : NULL, _cstr_mem(cap));
self->str = (char *) &rep[2];