projects
/
remotetop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add usage(), minor code cleanups
[remotetop.git]
/
td_unit.c
diff --git
a/td_unit.c
b/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;
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;
ptr->maxnumber = n;
ptr->number=0;