[Libvir] [PATCH] Check calls to printf-like functions (and some fixes) (second version)

Daniel P. Berrange berrange at redhat.com
Fri Mar 16 15:39:14 UTC 2007


>      if (boot_dev) {
>          if (xmlStrEqual(boot_dev, BAD_CAST "fd")) {
> -            virBufferVSprintf(buf, "(boot a)", (const char *) boot_dev);
> +            virBufferVSprintf(buf, "(boot a)" /*, (const char *) boot_dev*/);
>          } else if (xmlStrEqual(boot_dev, BAD_CAST "cdrom")) {
> -            virBufferVSprintf(buf, "(boot d)", (const char *) boot_dev);
> +            virBufferVSprintf(buf, "(boot d)" /*, (const char *) boot_dev*/);
>          } else if (xmlStrEqual(boot_dev, BAD_CAST "hd")) {
> -            virBufferVSprintf(buf, "(boot c)", (const char *) boot_dev);
> +            virBufferVSprintf(buf, "(boot c)" /*, (const char *) boot_dev*/);

This looks like rather dubios legacy code - kill the last arg completely
rather than commenting it out.

The rest looks fine to me.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list