[quagga-dev 10635] Re: [PATCH 1/2] lib: fix possible off-by-one in stream_put_prefix()

David Lamparter equinox at opensourcerouting.org
Wed Jul 31 17:59:39 BST 2013


On Wed, Jul 31, 2013 at 06:51:35PM +0200, Jorge Boncompte [DTI2] wrote:
> El 31/07/2013 18:14, Greg Troxel escribió:
> > 
> > "Jorge Boncompte [DTI2]" <jorge at dti2.net> writes:
> > 
> >> -  
> >> +
> > 
> > In general, patch guidelines ask that patches not make unnecessary
> > changes to whitespace.  In this particular case, the changes are adding
> > leading white to blank lines, which shouldn't happen anyway.
> > 
> >   -  stream_putc (s, p->prefixlen);
> >   +  s->data[s->endp++] = p->prefixlen;
> > 
> > I don't understand why it's necessary to open-code the function call
> > here.
> > 
> 
> You are right. I'll resend without whitespace changes and a proper changelog
> stating that there is an optimization included.

Since we're in stream.c here, I believe this is how it should be anyway.
If it were somewhere else, stream_putc() would be appropriate.

-David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: Digital signature
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20130731/373ac5de/attachment-0001.sig>


More information about the Quagga-dev mailing list