(shp_maxno): Variable's value is well-known constant N_MAXSHIPS + 1.
Useless, remove. Users changed to check mchr's sentinel, because that's clearer than comparing the index to N_MAXSHIPS or sizeof(mchr) / sizeof(*mchr). (mchr): Change sentinel's m_name to NULL.
This commit is contained in:
parent
47192c9079
commit
e23d8a8fac
5 changed files with 4 additions and 15 deletions
|
@ -49,16 +49,14 @@ global_init(void)
|
|||
init_pchr();
|
||||
init_mchr();
|
||||
init_plchr();
|
||||
/* the same thing should be done for units... */
|
||||
}
|
||||
|
||||
static void
|
||||
init_mchr(void)
|
||||
{
|
||||
struct mchrstr *mp;
|
||||
int n;
|
||||
|
||||
for (mp = mchr, n = 0; n < shp_maxno; n++, mp++) {
|
||||
for (mp = mchr; mp->m_name; mp++) {
|
||||
if (mp->m_nxlight)
|
||||
mp->m_flags |= M_XLIGHT;
|
||||
if (mp->m_nchoppers)
|
||||
|
@ -74,7 +72,6 @@ static void
|
|||
init_plchr(void)
|
||||
{
|
||||
struct plchrstr *pp;
|
||||
int pcount;
|
||||
|
||||
for (pp = plchr; pp->pl_name; pp++) {
|
||||
if (pp->pl_flags & P_M)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue