Source-Changes archive

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

Re: CVS commit: basesrc/bin/sh




To: enami tsugutomo <enami%sm.sony.co.jp@localhost>

Subject: Re: CVS commit: basesrc/bin/sh

From: christos%zoulas.com@localhost (Christos Zoulas)

Date: Wed, 13 Feb 2002 21:02:54 -0500


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





References:

Re: CVS commit: basesrc/bin/sh
From: enami tsugutomo




Prev by Date: Re: CVS commit: basesrc/bin/sh

Next by Date: CVS commit: syssrc/sys/arch/arm/xscale

Previous by Thread: Re: CVS commit: basesrc/bin/sh

Next by Thread: CVS commit: basesrc/regress/bin/sh

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index