]> git.pond.sub.org Git - empserver/commitdiff
reject: Inline putreject() into its only caller setrej()
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Oct 2016 15:13:04 +0000 (17:13 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:20 +0000 (20:09 +0200)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/nat.h
src/lib/common/nat.c
src/lib/subs/rej.c

index 93794e25b4cc529d5eda39b0c641961cd7644a12..f233253acd7bcd503572f92518780a9d1aabfb75 100644 (file)
@@ -184,7 +184,6 @@ extern int relations_with(natid, natid);
 extern int getrejects(natid them, struct natstr *np);
 extern int in_contact(natid, natid);
 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 int influx(struct natstr *np);
 extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
index eef71ccdf396f025ef6541044c8436e017d6e631..265a0401aa924d8146ecb7096808d1467bc97155 100644 (file)
@@ -121,15 +121,6 @@ putrel(struct natstr *np, natid them, int 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
 influx(struct natstr *np)
 {
index 8e4b0cdb899b74238fdf99d2322ade75ce4ed012..285d2b9f8060d9bc51286b1e179f5d57a42c947a 100644 (file)
@@ -138,6 +138,9 @@ setrej(natid us, natid them, int how, int what)
 
     if (CANT_HAPPEN(!np))
        return;
-    putreject(np, them, how, what);
+    if (how)
+       np->nat_rejects[them] |= what;
+    else
+       np->nat_rejects[them] &= ~what;
     putnat(np);
 }