remove unnecessary null checks from christen_monst

Closes #681
This commit is contained in:
nhmall
2022-02-11 09:08:31 -05:00
parent 7c1dba3f0b
commit 5faace8b9e
2 changed files with 3 additions and 2 deletions

View File

@@ -1537,7 +1537,8 @@ function savelev() in save.c was dereferencing a NHFILE pointer for
function tin_details() in eat.c was passing an obj pointer to
tin_variety() where it was dereferenced; move the tin_details()
NULL check above that tin_variety() call (pr #676 by argrath)
remove unnecessary null checks from christen_orc() (pr #681 by argrath)
Code Cleanup and Reorganization
-------------------------------

View File

@@ -2415,7 +2415,7 @@ christen_orc(struct monst *mtmp, const char *gang, const char *other)
char buf[BUFSZ], buf2[BUFSZ], *orcname;
orcname = rndorcname(buf2);
/* orcname is never NULL */
/* rndorcname() won't return NULL */
sz = (int) strlen(orcname);
if (gang)
sz += (int) (strlen(gang) + sizeof " of " - sizeof "");