X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=blobdiff_plain;f=psort.c;h=e0560919a4c17cbd293260c9665e640ca2ab6a53;hb=b030450e37fedf401284d076257f6ddebf3eda02;hp=f61221c66961185ee43d74662ba63335506d2960;hpb=c75e825f19e5cb6d6a6e039e4f7ae325afa55f8b;p=tedtools.git diff --git a/psort.c b/psort.c index f61221c..e056091 100644 --- a/psort.c +++ b/psort.c @@ -111,9 +111,8 @@ PS_init( SORT* sobj, int buflen, compare_sort func, ffree ffunc ) { 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; @@ -149,7 +148,7 @@ PS_reset( SORT* sobj ) { int i; if ( sobj->free ) { - for(i=0; icurlen; i++ ); + for(i=0; icurlen; i++ ) (*(sobj->free))( sobj->buf[i].value ); } memset( (void*)sobj->buf, 0, sizeof(SORTITEM)*sobj->buflen );