strbuffer: Optimize string termination
Do not zero all of the memory, just the first unused byte to make the string null terminated.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
typedef struct {
|
||||
char *value;
|
||||
int length;
|
||||
int size;
|
||||
int length; /* bytes used */
|
||||
int size; /* bytes allocated */
|
||||
} strbuffer_t;
|
||||
|
||||
int strbuffer_init(strbuffer_t *strbuff);
|
||||
|
||||
Reference in New Issue
Block a user