Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: basesrc/bin/sh



On Feb 14, 10:58am, enami%sm.sony.co.jp@localhost (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





Home | Main Index | Thread Index | Old Index