diff --git a/include/nat.h b/include/nat.h index be31d2f0..c761ea8e 100644 --- a/include/nat.h +++ b/include/nat.h @@ -109,9 +109,6 @@ struct natstr { long nat_flags; /* nation flags */ }; - /* Update fields. */ -#define WUPD_WANT bit(0) - /* nstat values */ #define VIS bit(0) #define SANCT (bit(1) | VIS) diff --git a/src/lib/commands/zdon.c b/src/lib/commands/zdon.c index c6ac37f4..8a03ef58 100644 --- a/src/lib/commands/zdon.c +++ b/src/lib/commands/zdon.c @@ -63,7 +63,6 @@ zdon(void) struct natstr *natp; char *p; - int update; int checking; int wantupd; int totpop; @@ -112,14 +111,12 @@ zdon(void) pr("Unable to request an update as the country is in flux\n"); return RET_FAIL; } - update = natp->nat_update | WUPD_WANT; natp->nat_missed = 0; pr("You (%d) now want an update.\n", whichcnum); } else { - update = natp->nat_update & ~WUPD_WANT; pr("You (%d) now DON'T want an update.\n", whichcnum); } - natp->nat_update = update; + natp->nat_update = wantupd; putnat(natp); } diff --git a/src/lib/common/wantupd.c b/src/lib/common/wantupd.c index e1edfbb1..6fccaeb7 100644 --- a/src/lib/common/wantupd.c +++ b/src/lib/common/wantupd.c @@ -132,7 +132,7 @@ demand_update_want(int *want, int *pop, int which) /* Should probably include sanctuaries ..... */ if (natp->nat_stat == STAT_ACTIVE) { totpop++; - if ((natp->nat_update & WUPD_WANT) == WUPD_WANT) { + if (natp->nat_update) { totwant++; if (which == cn) whichwants++; diff --git a/src/lib/update/removewants.c b/src/lib/update/removewants.c index 66f79bb4..eecd4dcb 100644 --- a/src/lib/update/removewants.c +++ b/src/lib/update/removewants.c @@ -42,11 +42,9 @@ update_removewants(void) struct natstr *natp; for (cn = 0; NULL != (natp = getnatp(cn)); cn++) { - if ((natp->nat_stat != STAT_UNUSED) && - (natp->nat_update & WUPD_WANT) == 0) { + if (natp->nat_stat != STAT_UNUSED && !natp->nat_update) natp->nat_missed++; - } - natp->nat_update &= ~WUPD_WANT; + natp->nat_update = 0; } return 0; }