scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit b8a54a3191397d05409e02952cb565224a7074b9
parent 1e53e28ec60d111e9b42ab7b793fde282c7fdff2
Author: sin <sin@2f30.org>
Date:   Thu,  1 Aug 2013 15:06:13 +0100

Fix vertical spacing

Diffstat:
Mrandom/rballoc.c | 6------
1 file changed, 0 insertions(+), 6 deletions(-)

diff --git a/random/rballoc.c b/random/rballoc.c @@ -92,7 +92,6 @@ mmap_pages(size_t siz) if (siz % PAGESIZE) siz = (siz + PAGESIZE) & ~(PAGESIZE - 1); - addr = mmap(0, siz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); if (addr == MAP_FAILED) @@ -141,12 +140,10 @@ realloc(void *oldp, size_t siz) if (!oldp) return malloc(siz); - if (!siz && oldp) { free(oldp); return NULL; } - n.buf = oldp; /* Search the alloc tree for an allocation starting * at address `oldp' */ @@ -207,17 +204,14 @@ posix_memalign(void **memptr, size_t align, size_t size) return EINVAL; if (align < sizeof(void *)) return EINVAL; - if (PAGESIZE % align) { fprintf(stderr, "%s: %zu alignment not supported!\n", __func__, align); abort(); } - mem = malloc(size); if (!mem) return ENOMEM; - *memptr = mem; return 0; }