Hoist strlen() outside loop in osdfunc_listsymbols()

git-svn-id: https://svn.eduke32.com/eduke32@7024 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-07 05:22:03 +00:00
parent 4f590f59c1
commit a677b18b2d

View file

@ -508,9 +508,11 @@ static int32_t osdfunc_listsymbols(osdfuncparm_t const * const parm)
else else
OSD_Printf("%sSymbol listing:\n", osd->draw.highlight); OSD_Printf("%sSymbol listing:\n", osd->draw.highlight);
int const parmlen = Bstrlen(parm->parms[0]);
for (i=symbols; i!=NULL; i=i->next) for (i=symbols; i!=NULL; i=i->next)
{ {
if (i->func == OSD_UNALIASED || (parm->numparms == 1 && Bstrncmp(parm->parms[0], i->name, Bstrlen(parm->parms[0])))) if (i->func == OSD_UNALIASED || (parm->numparms == 1 && Bstrncmp(parm->parms[0], i->name, parmlen)))
continue; continue;
{ {