On Fri, Aug 01, 2008 at 10:02:50AM +0200, Jim Meyering wrote: > "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote: > > +static int > > +cmdEdit (vshControl *ctl, vshCmd *cmd) > > +{ > ... > > +static int > > +cmdNetworkEdit (vshControl *ctl, vshCmd *cmd) > > +{ > ... > > +static int > > +cmdPoolEdit (vshControl *ctl, vshCmd *cmd) > > +{ > > Have you considered factoring these three? > At 70-80 lines each, with so much common code, it's begging for it. I certainly did! Normally of course I'd do it with closures, but ... I'll go with the 'sed' approach unless anyone stronly objects to that. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list