X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcstring.c;h=6d16d2bb8427edfe9767259f3f9c01ec20a1ca6a;hb=32c41cac57abc7887875b82c4b1511939ee4b5f1;hp=19395724e50e24ccd1853d7bb016387e27df32d1;hpb=6f9f33a6a5c7d677b4f4464218c01580a391cf08;p=smdp.git diff --git a/src/cstring.c b/src/cstring.c index 1939572..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; } @@ -65,4 +65,3 @@ void cstring_delete(cstring_t *self) { free(self->text); free(self); } -