diff options
author | 2006-07-03 20:39:57 +1000 | |
---|---|---|
committer | 2006-07-03 20:39:57 +1000 | |
commit | d56ab1d365e6d54535f5942c323c36baebaa7e65 (patch) | |
tree | a1b31411698d88391d6ad7460beea99f31f0877a /util.c | |
parent | 38175cdd30cb4897ee3fda8c9afcd9f23d0525f4 (diff) |
Switch from die_mem function to DIE_MEM macro in order to be able to give a line and file for the OOM message
darcs-hash:20060703103957-ac50b-8d7a860d931fd087f6d1759bc1e934dba1cfefe2.gz
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -664,7 +664,7 @@ array_list_t *al_new() { array_list_t *res = malloc( sizeof( array_list_t ) ); if( !res ) - die_mem(); + DIE_MEM(); al_init( res ); return res; } @@ -865,7 +865,7 @@ string_buffer_t *sb_new() { string_buffer_t *res = malloc( sizeof( string_buffer_t ) ); if( !res ) - die_mem(); + DIE_MEM(); sb_init( res ); return res; } @@ -972,7 +972,7 @@ int sb_vprintf( string_buffer_t *buffer, const wchar_t *format, va_list va_orig buffer->length = MIN_SIZE; buffer->buff = malloc( MIN_SIZE ); if( !buffer->buff ) - die_mem(); + DIE_MEM(); } @@ -1012,7 +1012,7 @@ int sb_vprintf( string_buffer_t *buffer, const wchar_t *format, va_list va_orig buffer->buff = realloc( buffer->buff, 2*buffer->length ); if( !buffer->buff ) - die_mem(); + DIE_MEM(); buffer->length *= 2; } return res; @@ -1085,7 +1085,7 @@ void b_append( buffer_t *b, const void *d, ssize_t len ) void *d = realloc( b->buff, l ); if( !d ) { - die_mem(); + DIE_MEM(); } b->buff=d; |