[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 3/8] Remove unused and bitrotting vshCommandOptStringList



On 07/15/10 - 03:11:02PM, Matthias Bolte wrote:
> 2010/7/8 Chris Lalancette <clalance redhat com>:
> > Signed-off-by: Chris Lalancette <clalance redhat com>
> > ---
> >  tools/virsh.c |   29 -----------------------------
> >  1 files changed, 0 insertions(+), 29 deletions(-)
> >
> > diff --git a/tools/virsh.c b/tools/virsh.c
> > index d539fbc..c1451d8 100644
> > --- a/tools/virsh.c
> > +++ b/tools/virsh.c
> > @@ -227,9 +227,6 @@ static char *vshCommandOptString(const vshCmd *cmd, const char *name,
> >                                  int *found);
> >  static long long vshCommandOptLongLong(const vshCmd *cmd, const char *name,
> >                                        int *found);
> > -#if 0
> > -static int vshCommandOptStringList(const vshCmd *cmd, const char *name, char ***data);
> > -#endif
> >  static int vshCommandOptBool(const vshCmd *cmd, const char *name);
> >
> >  #define VSH_BYID     (1 << 1)
> > @@ -9564,32 +9561,6 @@ vshCommandOptLongLong(const vshCmd *cmd, const char *name, int *found)
> >     return res;
> >  }
> >
> > -#if 0
> > -static int
> > -vshCommandOptStringList(const vshCmd *cmd, const char *name, char ***data)
> > -{
> > -    vshCmdOpt *arg = cmd->opts;
> > -    char **val = NULL;
> > -    int nval = 0;
> > -
> > -    while (arg) {
> > -        if (arg->def && STREQ(arg->def->name, name)) {
> > -            char **tmp = realloc(val, sizeof(*tmp) * (nval+1));
> > -            if (!tmp) {
> > -                VIR_FREE(val);
> > -                return -1;
> > -            }
> > -            val = tmp;
> > -            val[nval++] = arg->data;
> > -        }
> > -        arg = arg->next;
> > -    }
> > -
> > -    *data = val;
> > -    return nval;
> > -}
> > -#endif
> > -
> >  /*
> >  * Returns TRUE/FALSE if the option exists
> >  */
> > --
> > 1.7.1.1
> >
> 
> ACK.

Thanks, pushed.

--
Chris Lalancette


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]