No need to track excess length

.. this is a relic from when the actual required length was given
back to the caller
This commit is contained in:
Jeff Epler 2022-12-09 14:29:14 -06:00
parent cc7d550407
commit 040fac0724
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -101,8 +101,6 @@ STATIC void seek_eof(file_arg *active_file) {
STATIC void vstr_add_byte_nonstd(vstr_t *vstr, byte b) {
if (!vstr->fixed_buf || vstr->alloc > vstr->len) {
vstr_add_byte(vstr, b);
} else {
vstr->len++;
}
}
@ -114,8 +112,6 @@ STATIC void vstr_add_char_nonstd(vstr_t *vstr, unichar c) {
(c < 0x10000) ? 3 : 4;
if (!vstr->fixed_buf || vstr->alloc > vstr->len + ulen) {
vstr_add_char(vstr, c);
} else {
vstr->len += ulen;
}
}