diff options
author | Stef Walter <stef@thewalter.net> | 2004-05-07 01:45:49 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2004-05-07 01:45:49 +0000 |
commit | 4297404391e6d828d71306f7402ba1cdd05297aa (patch) | |
tree | 41efac068d7dff03c061fad9b75e83bf36f9653c /src/compat.c | |
parent | e0f1ee22b9aae014c8dcdf1ba98bbdaffb716b0d (diff) |
- Fixed attribute List problems.
- Super fragmented MFTs work
- Ignore compressed and encrypted files
- Simplified memory management.
- Skip simple files
- Win32 compatibility work
Diffstat (limited to 'src/compat.c')
-rw-r--r-- | src/compat.c | 16 |
1 files changed, 13 insertions, 3 deletions
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 |