From: erickson Date: Mon, 7 May 2007 14:07:36 +0000 (+0000) Subject: added size check to constructor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=df877c8e0d8901cdaf4c41df126b8285566dc8db;p=opensrf%2Fbjwebb.git added size check to constructor git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@874 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/libstack/osrf_list.c b/src/libstack/osrf_list.c index 261e850..0054c79 100644 --- a/src/libstack/osrf_list.c +++ b/src/libstack/osrf_list.c @@ -11,6 +11,7 @@ osrfList* osrfNewList() { osrfList* osrfNewListSize( unsigned int size ) { osrfList* list; OSRF_MALLOC(list, sizeof(osrfList)); + if( size <= 0 ) size = 16; list->arrsize = size; OSRF_MALLOC( list->arrlist, list->arrsize * sizeof(void*) ); return list;