reject: Inline putreject() into its only caller setrej()
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
c89ba354e3
commit
8a129dee20
3 changed files with 4 additions and 11 deletions
|
@ -184,7 +184,6 @@ extern int relations_with(natid, natid);
|
||||||
extern int getrejects(natid them, struct natstr *np);
|
extern int getrejects(natid them, struct natstr *np);
|
||||||
extern int in_contact(natid, natid);
|
extern int in_contact(natid, natid);
|
||||||
extern void putrel(struct natstr *np, natid them, int relate);
|
extern void putrel(struct natstr *np, natid them, int relate);
|
||||||
extern void putreject(struct natstr *np, natid them, int how, int what);
|
|
||||||
extern void agecontact(struct natstr *np);
|
extern void agecontact(struct natstr *np);
|
||||||
extern int influx(struct natstr *np);
|
extern int influx(struct natstr *np);
|
||||||
extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
|
extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
|
||||||
|
|
|
@ -121,15 +121,6 @@ putrel(struct natstr *np, natid them, int relate)
|
||||||
np->nat_relate[them] = relate;
|
np->nat_relate[them] = relate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
putreject(struct natstr *np, natid them, int how, int what)
|
|
||||||
{
|
|
||||||
if (how)
|
|
||||||
np->nat_rejects[them] |= what;
|
|
||||||
else
|
|
||||||
np->nat_rejects[them] &= ~what;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
influx(struct natstr *np)
|
influx(struct natstr *np)
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,6 +138,9 @@ setrej(natid us, natid them, int how, int what)
|
||||||
|
|
||||||
if (CANT_HAPPEN(!np))
|
if (CANT_HAPPEN(!np))
|
||||||
return;
|
return;
|
||||||
putreject(np, them, how, what);
|
if (how)
|
||||||
|
np->nat_rejects[them] |= what;
|
||||||
|
else
|
||||||
|
np->nat_rejects[them] &= ~what;
|
||||||
putnat(np);
|
putnat(np);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue