SCP: Prevent use of uninitialized pointer.

This commit is contained in:
Timothe Litt 2013-07-05 00:24:21 -04:00
parent 4497bba48f
commit 3acbd0e2ca

4
scp.c
View file

@ -2526,7 +2526,7 @@ char gbuf[CBUFSIZE], *cvptr;
DEVICE *dptr; DEVICE *dptr;
UNIT *uptr; UNIT *uptr;
MTAB *mptr; MTAB *mptr;
SHTAB *shtb, *shptr; SHTAB *shtb = NULL, *shptr;
static SHTAB show_glob_tab[] = { static SHTAB show_glob_tab[] = {
{ "CONFIGURATION", &show_config, 0 }, { "CONFIGURATION", &show_config, 0 },
@ -2636,7 +2636,7 @@ while (*cptr != 0) { /* do all mods */
} /* end if */ } /* end if */
} /* end for */ } /* end for */
if (mptr->mask == 0) { /* no match? */ if (mptr->mask == 0) { /* no match? */
if ((shptr = find_shtab (shtb, gbuf))) /* global match? */ if (shtb && (shptr = find_shtab (shtb, gbuf))) /* global match? */
shptr->action (ofile, dptr, uptr, shptr->arg, cptr); shptr->action (ofile, dptr, uptr, shptr->arg, cptr);
else return SCPE_ARG; else return SCPE_ARG;
} /* end if */ } /* end if */