X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=remotetop.git;a=blobdiff_plain;f=td_unit.c;fp=td_unit.c;h=77ca5883bc099eb8fc59da6f670440960682c336;hp=c736284cc3d8719cd0b167905c74f046cc74ba49;hb=e3fdb3b9f9b62a71c2a11b5e27ee47214901a3e2;hpb=0db0da94f6e0d2809d5176cb408f40773d6073ca diff --git a/td_unit.c b/td_unit.c index c736284..77ca588 100644 --- a/td_unit.c +++ b/td_unit.c @@ -39,9 +39,7 @@ MassiveUnit* allocUnits(int n ) { MassiveUnit *ptr = NULL; - ptr = (MassiveUnit*)malloc( MUHDRSZ + n * sizeof(UnitInfo) ); - if ( !ptr ) - tlog(TL_CRIT|TL_EXIT, "allocUnits: no memoru for %d units", n); + ptr = (MassiveUnit*)tmalloc( MUHDRSZ + n * sizeof(UnitInfo) ); ptr->maxnumber = n; ptr->number=0;