subs, localize `subs0'

nobody looks at subs0, except doit().
  doit() allways initializes it to NULL,
    and restores it on return
    thus its a local ...

  note:
    in error cases subs is *not* allways restored
    assume this to have been a bug
This commit is contained in:
rlar 2012-03-11 21:32:38 +01:00
parent 7dbff22038
commit 30a56fc113
1 changed files with 1 additions and 4 deletions

View File

@ -120,7 +120,6 @@ struct subs {
*/
static wordlist *modnames, *submod;
static struct subs *subs0 = NULL;
static bool nobjthack = FALSE;
/* flag indicating use of the experimental numparams library */
static bool use_numparams = FALSE;
@ -402,11 +401,10 @@ doit(struct line *deck) {
bool gotone;
wordlist *tmodnames = modnames;
wordlist *tsubmod = submod;
struct subs *ts = subs0;
int error;
/* Save all the old stuff... */
subs0 = NULL;
struct subs *subs0 = NULL;
submod = NULL;
#ifdef TRACE
@ -691,7 +689,6 @@ doit(struct line *deck) {
if (error)
return NULL; /* error message already reported; should free( ) */
subs0 = ts;
modnames = tmodnames;
submod = tsubmod;
/*