comparison src/content.c @ 281:5eece4dfd945 noffle

[svn] * src/log.c,src/log.h: Add Log_fatal() for reporting fatal errors and exiting, Log_gdbm_fatal() for the the same but specifically as a GDBM error reporting function, and a new log debug level AUTH for a forthcoming authentication mechanism. * src/database.c,src/group.c: Provide new gdbm error function to all gdbm opens. * src/noffle.c: Add atexit() to always close databases on a program- inspired exit. * src/content.c,src/dynamicstring.c,src/fetchlist.c,src/filter.c, src/itemlist.c,src/log.c,src/log.h,src/over.c,src/protocol.h, src/request.c,src/util.c: Use Log_fatal where appropriate.
author bears
date Fri, 27 Dec 2002 21:48:25 +0000
parents 52f467c7213b
children 9b79433f0976
comparison
equal deleted inserted replaced
280:9c54bf672ca1 281:5eece4dfd945
1 /* 1 /*
2 content.c 2 content.c
3 3
4 $Id: content.c 387 2002-06-26 13:15:44Z bears $ 4 $Id: content.c 413 2002-12-27 21:48:25Z bears $
5 */ 5 */
6 6
7 #if HAVE_CONFIG_H 7 #if HAVE_CONFIG_H
8 #include <config.h> 8 #include <config.h>
9 #endif 9 #endif
48 if ( cont.max < cont.size + 1 ) 48 if ( cont.max < cont.size + 1 )
49 { 49 {
50 if ( ! ( cont.elem = realloc( cont.elem, 50 if ( ! ( cont.elem = realloc( cont.elem,
51 ( cont.max + 500 ) 51 ( cont.max + 500 )
52 * sizeof( cont.elem[ 0 ] ) ) ) ) 52 * sizeof( cont.elem[ 0 ] ) ) ) )
53 { 53 Log_fatal( "Could not realloc overview list" );
54 Log_err( "Could not realloc overview list" );
55 exit( EXIT_FAILURE );
56 }
57 cont.max += 500; 54 cont.max += 500;
58 } 55 }
59 ASSERT( cont.vecFirst > 0 ); 56 ASSERT( cont.vecFirst > 0 );
60 if ( ov ) 57 if ( ov )
61 Ov_setNumb( ov, cont.vecFirst + cont.size ); 58 Ov_setNumb( ov, cont.vecFirst + cont.size );