Add usage(), minor code cleanups
[remotetop.git] / td_unit.c
index c736284..77ca588 100644 (file)
--- 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;