Subject: Re: CVS commit: basesrc/bin/sh
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Christos Zoulas <christos@zoulas.com>
List: source-changes
Date: 02/13/2002 21:02:54
On Feb 14, 10:58am, enami@sm.sony.co.jp (enami tsugutomo) wrote:
-- Subject: Re: CVS commit: basesrc/bin/sh

You are absolutely right. A fix would be to never use the first word, or
allocate a word less...

christos

| 
| > | >  			varnest++;
| > | > +			if (varnest >= maxnest) {
| > | > +				maxnest += 32;
| > | > +				dblquotep = ckrealloc(dblquotep, maxnest / 8);
| > | > +				if (maxnest == 64)
| > | > +					*dblquotep = dblquote;
| > | 
| > | ...here, dblquotep[0] is initialized with dblquote.  It looks
| > | inconsistient.
| > 
| > Yes, but I wanted to keep the dblquotep array correct no matter if it is used
| > or not. It is a good programming practice to keep data consistent.
| 
| Once the varnest become < 32 again, data will be inconsistient.
| 
| enami.
-- End of excerpt from enami tsugutomo