X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fcstring.c;h=6d16d2bb8427edfe9767259f3f9c01ec20a1ca6a;hb=43aa3385fb0e78b302a9191789d59115402035f8;hp=59c549cf3f5a50657342a3c1de35f12b18e033b9;hpb=a10fcae3cba4f58550b24b0029f3932615dadbc3;p=smdp.git diff --git a/src/cstring.c b/src/cstring.c index 59c549c..6d16d2b 100644 --- a/src/cstring.c +++ b/src/cstring.c @@ -26,7 +26,7 @@ cstring_t *cstring_init() { cstring_t *x = malloc(sizeof(cstring_t)); - x->text = (void*)0; + x->text = NULL; x->size = x->alloc = 0; x->expand = cstring_expand; x->expand_arr = cstring_expand_arr; @@ -57,7 +57,7 @@ void cstring_expand_arr(cstring_t *self, char *x) { void cstring_reset(cstring_t *self) { free(self->text); - self->text = (void*)0; + self->text = NULL; self->size = self->alloc = 0; }