Add debugging aid to uc_dstr_reset
This commit is contained in:
+3
-1
@@ -65,9 +65,11 @@ int uc_dstr_ensure(struct DStr *str, size_t total)
|
||||
void uc_dstr_reset(struct DStr *str)
|
||||
{
|
||||
str->len = 0;
|
||||
#ifdef DEBUG
|
||||
if (str->str) {
|
||||
str->str[0] = 0;
|
||||
memset(str->str, 0xcc, str->allocated);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void uc_dstr_terminate(struct DStr *str)
|
||||
|
||||
Reference in New Issue
Block a user