update: Drop produce() return value and parameters work, amount
Since changing *sp is safe now, we can move the update of sp->sct_avail into produce(). This frees the return value; use it to return the amount produced. Drop the parameters. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
688c8b736b
commit
0efa8fa7a1
3 changed files with 10 additions and 13 deletions
|
@ -328,8 +328,7 @@ produce_sect(struct natstr *np, int etu, struct bp *bp, int p_sect[][2])
|
|||
|
||||
if (sp->sct_effic >= 60) {
|
||||
if (np->nat_money >= 0 && dchr[desig].d_prd >= 0)
|
||||
sp->sct_avail -= produce(np, sp, sp->sct_avail, desig,
|
||||
sp->sct_effic, &pcost, &amount);
|
||||
amount = produce(np, sp, desig, sp->sct_effic, &pcost);
|
||||
bp_put_items(bp, sp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue