[ovs-dev] [PATCH 1/2] vconn-stream: Refactor vconn_stream_recv() for readability.

Ben Pfaff blp at nicira.com
Tue May 11 18:55:45 UTC 2010


On Tue, May 11, 2010 at 11:38:58AM -0700, Jesse Gross wrote:
> On Mon, May 10, 2010 at 3:05 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > On Fri, May 07, 2010 at 06:09:25PM -0700, Jesse Gross wrote:
> > > On Wed, May 5, 2010 at 10:31 AM, Ben Pfaff <blp at nicira.com> wrote:
> > >
> > > > Backward "goto" statement are rarely a good idea, so this rewrites that
> > > > code to be a little more readable.
> > > >
> > >
> > > This looks correct but to be honest I actually find the old version more
> > > readable.  When I first looked at this, I thought that the loop could
> > > potentially execute many times.  It also seems to make more sense that
> > the
> > > success exit condition should be grouped with the packet length
> > > determination in the second pass, since that is the only time that it can
> > be
> > > hit.
> >
> > You're right.  The new version is at least as confusing.
> >
> > Here's another try.  Do you like it better?  I think that I do.
> >
> 
> I like this version a lot better.  Looks good, thanks.

Thanks.  I pushed this and the second commit out.




More information about the dev mailing list