diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-20 12:34:14 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-20 12:34:14 +0000 |
commit | 0d82edd9f8bebb396a9154d4e1003340dbf6b967 (patch) | |
tree | 0659c834f387f3504944a610ed6858b9e268e6c7 /src/libstddjb/alloc.c | |
parent | 2436785702b47996e9f0e281df0d6027660ec914 (diff) | |
download | skalibs-0d82edd9f8bebb396a9154d4e1003340dbf6b967.tar.xz |
Lots of cosmetic fixes.
sha256 documented.
Diffstat (limited to 'src/libstddjb/alloc.c')
-rw-r--r-- | src/libstddjb/alloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstddjb/alloc.c b/src/libstddjb/alloc.c index e3f89dd..31e3e05 100644 --- a/src/libstddjb/alloc.c +++ b/src/libstddjb/alloc.c @@ -13,9 +13,9 @@ # define PLM(...) (bprintf(buffer_2, "%s: debug_alloc: ", PROG), bprintf(buffer_2, __VA_ARGS__), buffer_putflush(buffer_2, "\n", 1)) #endif -aligned_char_ref alloc (unsigned int n) +aligned_char *alloc (unsigned int n) { - register aligned_char_ref p = n ? (aligned_char_ref)malloc(n) : (aligned_char_ref)alloc_0 ; + register aligned_char *p = n ? (aligned_char *)malloc(n) : (aligned_char *)alloc_0 ; #ifdef DEBUG_ALLOC static unsigned int counter = 0 ; PLM("alloc(%u): %p. Allocated: %u", n, p, ++counter) ; @@ -37,9 +37,9 @@ void alloc_free (void *p) errno = e ; } -int alloc_realloc (aligned_char_ref *x, unsigned int n) +int alloc_realloc (aligned_char **x, unsigned int n) { - aligned_char_ref y = n ? (aligned_char_ref)realloc(*x, n) : (free(*x), alloc_0) ; + aligned_char *y = n ? (aligned_char *)realloc(*x, n) : (free(*x), alloc_0) ; #ifdef DEBUG_ALLOC PLM("alloc_realloc(&%p) -> new address = %p", *x, y) ; #endif |