(CANT_REACH): New. Use it instead of CANT_HAPPEN() where possible.
(oops): Cope with NULL argument passed by CANT_REACH().
This commit is contained in:
parent
98d35dec3e
commit
6fee3f4535
13 changed files with 26 additions and 19 deletions
|
@ -105,7 +105,7 @@ logerror(char *format, ...)
|
|||
int
|
||||
oops(char *msg, char *file, int line)
|
||||
{
|
||||
logerror("Oops: %s in %s:%d", msg, file, line);
|
||||
logerror("Oops: %s in %s:%d", msg ? msg : "bug", file, line);
|
||||
if (debug) abort();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
|||
int c;
|
||||
switch (bmap) {
|
||||
default:
|
||||
CANT_HAPPEN("bad BMAP");
|
||||
CANT_REACH();
|
||||
bmap = 'b';
|
||||
/* fall through */
|
||||
case 'b':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue