Use ef_blank() when extending treaty, loan, comm and trade file

Only treaty extension initialized ef_type and uid properly.  None of
them zeroed unused members and holes in the struct.  comm and trade
extension called ef_extend(), which had no effect, so remove that.
This commit is contained in:
Markus Armbruster 2008-02-24 18:47:22 +01:00
parent 93d8c53f21
commit 2da8d0c796
3 changed files with 6 additions and 8 deletions

View file

@ -143,9 +143,8 @@ sell(void)
if (comm.com_owner == 0)
break;
}
if (getcomm(ii, &comm) == 0)
ef_extend(EF_COMM, 1);
(void)time(&now);
ef_blank(EF_COMM, ii, &comm);
comm.com_type = ip->i_uid;
comm.com_owner = player->cnum;
comm.com_price = price;