aboutsummaryrefslogtreecommitdiff
path: root/src/base/string/fit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/string/fit.c')
-rw-r--r--src/base/string/fit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/base/string/fit.c b/src/base/string/fit.c
index 56ab041..23d4200 100644
--- a/src/base/string/fit.c
+++ b/src/base/string/fit.c
@@ -4,13 +4,14 @@
// buffer. if the capacity equals the length, then the function is a noop. the
// byte array is unchanged.
void
-str·fit(string *s)
+string·fit(string *s)
{
Hdr* h;
- vlong cap = str·cap(*s);
- vlong len = str·len(*s);
+ vlong cap = string·cap(*s);
+ vlong len = string·len(*s);
- if (cap == len) return;
+ if(cap == len)
+ return;
h = (Hdr*)(s - sizeof(Hdr));
h = realloc(h, sizeof(*h) + len + 1);