string: remove unnecessary refcount update

Passing the argument to a pure function is
essentially a "borrow", and the caller has had to
make sure the refcount doesn't drop to zero anyway
main
anna 3 years ago
parent 5aed426864
commit b011d5feb5
Signed by: fef
GPG Key ID: EC22E476DC2D3D84

@ -48,7 +48,6 @@ string *leftpad(const string *s, usize len, nchar fillchr, error *err)
return 0;
}
nget(s);
string *padded;
if (len < s->_len) {
@ -60,7 +59,6 @@ string *leftpad(const string *s, usize len, nchar fillchr, error *err)
padded = leftpad_unsafe(s, len, fillchr, err);
}
nput(s);
return padded;
}

Loading…
Cancel
Save