[libvirt] [PATCH] virsh: Fix uninitialized variable warning

Matthias Bolte matthias.bolte at googlemail.com
Sat May 14 04:54:54 UTC 2011


2011/5/13 Daniel P. Berrange <berrange at redhat.com>:
> On Fri, May 13, 2011 at 08:29:00AM +0200, Matthias Bolte wrote:
>> Reported on FreeBSD only.
>> ---
>>  tools/virsh.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/virsh.c b/tools/virsh.c
>> index fbeb7c8..3baa015 100644
>> --- a/tools/virsh.c
>> +++ b/tools/virsh.c
>> @@ -11131,7 +11131,7 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
>>          if (def->opts) {
>>              const vshCmdOptDef *opt;
>>              for (opt = def->opts; opt->name; opt++) {
>> -                const char *fmt;
>> +                const char *fmt = "%s";
>>                  switch (opt->type) {
>>                  case VSH_OT_BOOL:
>>                      fmt = "[--%s]";
> ACK
>
>
> Daniel
>

Thanks, pushed.

Matthias




More information about the libvir-list mailing list