(init_nats): Use CANT_HAPPEN() where appropriate.

This commit is contained in:
Markus Armbruster 2006-02-23 07:38:38 +00:00
parent 0bb11049f4
commit 08501fa9c3

View file

@ -55,7 +55,8 @@ init_nats(void)
}; };
struct natstr *np; struct natstr *np;
if ((np = getnatp(player->cnum)) == 0) np = getnatp(player->cnum);
if (CANT_HAPPEN(!np))
return -1; return -1;
player->nstat = nstat[np->nat_stat]; player->nstat = nstat[np->nat_stat];
player->god = np->nat_stat == STAT_GOD; player->god = np->nat_stat == STAT_GOD;
@ -86,8 +87,7 @@ nat_cap(int btu)
np = getnatp(player->cnum); np = getnatp(player->cnum);
if (!getsect(np->nat_xcap, np->nat_ycap, &sect)) { if (!getsect(np->nat_xcap, np->nat_ycap, &sect)) {
logerror("can't read %s's cap @ %d,%d", CANT_HAPPEN("read cap");
np->nat_cnam, np->nat_xcap, np->nat_ycap);
return -1; return -1;
} }
if (np->nat_stat >= STAT_ACTIVE) { if (np->nat_stat >= STAT_ACTIVE) {