From 4297404391e6d828d71306f7402ba1cdd05297aa Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 7 May 2004 01:45:49 +0000 Subject: - Fixed attribute List problems. - Super fragmented MFTs work - Ignore compressed and encrypted files - Simplified memory management. - Skip simple files - Win32 compatibility work --- src/compat.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/compat.c') diff --git a/src/compat.c b/src/compat.c index 013675f..fa171f1 100644 --- a/src/compat.c +++ b/src/compat.c @@ -288,11 +288,21 @@ void vwarnx(const char *fmt, va_list ap) void* reallocf(void* ptr, size_t size) { void* ret = realloc(ptr, size); + if(!ret) + errx(1, "out of memory"); + return ret; +} + +#endif - if(!ret && size) - free(ptr); +#ifndef HAVE_MALLOCF - return ret; +void* mallocf(size_t size) +{ + void* ret = malloc(size); + if(!ret) + errx(1, "out of memory"); + return ret; } #endif -- cgit v1.2.3