diff options
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/alloc_realloc.c | 4 | ||||
-rw-r--r-- | src/libstddjb/stralloc_ready_tuned.c | 2 | ||||
-rw-r--r-- | src/libstddjb/stralloc_shrink.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libstddjb/alloc_realloc.c b/src/libstddjb/alloc_realloc.c index 8787291..82be92b 100644 --- a/src/libstddjb/alloc_realloc.c +++ b/src/libstddjb/alloc_realloc.c @@ -3,9 +3,9 @@ #include <stdlib.h> #include <skalibs/alloc.h> -int alloc_realloc (void **x, size_t n) +int alloc_realloc (char **x, size_t n) { - void *y = n ? realloc(*x, n) : (free(*x), alloc(0)) ; + char *y = n ? (char *)realloc(*x, n) : (free(*x), (char *)alloc(0)) ; if (!y) return 0 ; *x = y ; return 1 ; diff --git a/src/libstddjb/stralloc_ready_tuned.c b/src/libstddjb/stralloc_ready_tuned.c index f292f22..d365d6e 100644 --- a/src/libstddjb/stralloc_ready_tuned.c +++ b/src/libstddjb/stralloc_ready_tuned.c @@ -19,7 +19,7 @@ int stralloc_ready_tuned (stralloc *sa, size_t n, size_t base, size_t a, size_t } else if (n > sa->a) { - if (!alloc_re((void **)&sa->s, sa->a, t)) return 0 ; + if (!alloc_re(&sa->s, sa->a, t)) return 0 ; sa->a = t ; } return 1 ; diff --git a/src/libstddjb/stralloc_shrink.c b/src/libstddjb/stralloc_shrink.c index a372084..0dceca2 100644 --- a/src/libstddjb/stralloc_shrink.c +++ b/src/libstddjb/stralloc_shrink.c @@ -7,7 +7,7 @@ int stralloc_shrink (stralloc *sa) { if (sa->a > sa->len) { - if (!alloc_re((void **)&sa->s, sa->a, sa->len)) return 0 ; + if (!alloc_re(&sa->s, sa->a, sa->len)) return 0 ; sa->a = sa->len ; } return 1 ; |