if ( ! func ) return -1;
if ( buflen <= 0 ) return -1;
- sobj->buf = (SORTITEM*)tmalloc( sizeof(SORTITEM)*buflen );
+ sobj->buf = (SORTITEM*)t0malloc( sizeof(SORTITEM)*buflen );
- memset( (void*)sobj->buf, 0, sizeof(SORTITEM)*buflen );
sobj->buflen = buflen;
sobj->cmpr = func;
sobj->free = ffunc;
int i;
if ( sobj->free ) {
- for(i=0; i<sobj->curlen; i++ );
+ for(i=0; i<sobj->curlen; i++ )
(*(sobj->free))( sobj->buf[i].value );
}
memset( (void*)sobj->buf, 0, sizeof(SORTITEM)*sobj->buflen );