update: Drop do_feed()'s return value
Call callers assign the return value to sp->sct_avail now. Move the assignment to do_feed() and drop the return value. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
8e246ee06d
commit
cc61904354
5 changed files with 6 additions and 6 deletions
|
@ -656,7 +656,7 @@ extern int dodistribute(struct sctstr *, int, double);
|
||||||
/* finish.c */
|
/* finish.c */
|
||||||
extern void finish_sects(int);
|
extern void finish_sects(int);
|
||||||
/* human.c */
|
/* human.c */
|
||||||
extern int do_feed(struct sctstr *, struct natstr *, int, int);
|
extern void do_feed(struct sctstr *, struct natstr *, int, int);
|
||||||
extern int feed_people(short *, int);
|
extern int feed_people(short *, int);
|
||||||
extern double food_needed(short *, int);
|
extern double food_needed(short *, int);
|
||||||
extern int famine_victims(short *, int);
|
extern int famine_victims(short *, int);
|
||||||
|
|
|
@ -55,7 +55,7 @@ newe(void)
|
||||||
continue;
|
continue;
|
||||||
if (!sect.sct_off) {
|
if (!sect.sct_off) {
|
||||||
natp = getnatp(sect.sct_own);
|
natp = getnatp(sect.sct_own);
|
||||||
sect.sct_avail = do_feed(§, natp, etu_per_update, 1);
|
do_feed(§, natp, etu_per_update, 1);
|
||||||
buildeff(§);
|
buildeff(§);
|
||||||
}
|
}
|
||||||
if (nsect++ == 0) {
|
if (nsect++ == 0) {
|
||||||
|
|
|
@ -101,7 +101,7 @@ prod(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
natp = getnatp(sect.sct_own);
|
natp = getnatp(sect.sct_own);
|
||||||
sect.sct_avail = do_feed(§, natp, etu_per_update, 1);
|
do_feed(§, natp, etu_per_update, 1);
|
||||||
buildeff(§);
|
buildeff(§);
|
||||||
if (sect.sct_effic < 60)
|
if (sect.sct_effic < 60)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -52,7 +52,7 @@ static int babies(int, int, double, int, int, int);
|
||||||
/*
|
/*
|
||||||
* feed the individual sector
|
* feed the individual sector
|
||||||
*/
|
*/
|
||||||
int
|
void
|
||||||
do_feed(struct sctstr *sp, struct natstr *np, int etu,
|
do_feed(struct sctstr *sp, struct natstr *np, int etu,
|
||||||
int round_babies_down)
|
int round_babies_down)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ do_feed(struct sctstr *sp, struct natstr *np, int etu,
|
||||||
trunc_people(sp, np);
|
trunc_people(sp, np);
|
||||||
|
|
||||||
sp->sct_work = sctwork;
|
sp->sct_work = sctwork;
|
||||||
return work_avail;
|
sp->sct_avail = work_avail;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -249,7 +249,7 @@ produce_sect(struct natstr *np, int etu, struct bp *bp, int p_sect[][2])
|
||||||
sp = &scratch_sect;
|
sp = &scratch_sect;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp->sct_avail = do_feed(sp, np, etu, 0);
|
do_feed(sp, np, etu, 0);
|
||||||
|
|
||||||
if (sp->sct_off || np->nat_money < 0) {
|
if (sp->sct_off || np->nat_money < 0) {
|
||||||
sp->sct_avail = 0;
|
sp->sct_avail = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue