diff options
Diffstat (limited to 'test/monniaux/jpeg-6b/jmemnobs.c')
-rw-r--r-- | test/monniaux/jpeg-6b/jmemnobs.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/monniaux/jpeg-6b/jmemnobs.c b/test/monniaux/jpeg-6b/jmemnobs.c index 8bf9f8be..02e14a1a 100644 --- a/test/monniaux/jpeg-6b/jmemnobs.c +++ b/test/monniaux/jpeg-6b/jmemnobs.c @@ -25,6 +25,7 @@ extern void * malloc JPP((size_t size)); extern void free JPP((void *ptr)); #endif + /* * Memory allocation and freeing are controlled by the regular library * routines malloc() and free(). @@ -33,21 +34,16 @@ extern void free JPP((void *ptr)); GLOBAL(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) { - void *p= (void *) malloc(sizeofobject); - if (p==NULL) { /* DM */ - printf("malloc (%zu) failed\n", sizeofobject); - } - return p; + return (void *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) { -#ifdef DMONNIAUX_FREE free(object); -#endif } + /* * "Large" objects are treated the same as "small" ones. * NB: although we include FAR keywords in the routine declarations, @@ -64,11 +60,10 @@ jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) GLOBAL(void) jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) { -#ifdef DMONNIAUX_FREE - free((void*)object); -#endif + free(object); } + /* * This routine computes the total memory space available for allocation. * Here we always say, "we got all you want bud!" @@ -93,7 +88,7 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed) { ERREXIT(cinfo, JERR_NO_BACKING_STORE); - KILL_TAIL_CALL + KILL_TAIL_CALL(); } |