From fc7c1dab34261fe195f2f4186c39a5686ca6ab53 Mon Sep 17 00:00:00 2001 From: FreeBirdLjj Date: Sun, 28 Sep 2014 20:37:36 +0800 Subject: [PATCH] Replace ((void*)0) with NULL. --- src/cstack.c | 2 +- src/cstring.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cstack.c b/src/cstack.c index 0043b5c..a5ecc06 100644 --- a/src/cstack.c +++ b/src/cstack.c @@ -25,7 +25,7 @@ cstack_t *cstack_init() { cstack_t *stack = malloc(sizeof(cstack_t)); - stack->content = (void*)0; + stack->content = NULL; stack->alloc = stack->size = 0; stack->head = -1; stack->push = cstack_push; 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; } -- 2.20.1