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

Richard W.M. Jones rjones at redhat.com
Fri Mar 16 15:31:45 UTC 2007


Any opinions on what this code was supposed to be doing?  I fixed it in 
the patch (now in CVS) by commenting out the extra boot_dev parameters - 
wasn't sure if they should be deleted altogether.

@@ -418,11 +418,11 @@

      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*/);
          } else {
              /* Any other type of boot dev is unsupported right now */
              virXMLError(conn, VIR_ERR_XML_ERROR, NULL, 0);

Rich.


-- 
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
  "[Negative numbers] darken the very whole doctrines of the equations
  and make dark of the things which are in their nature excessively
  obvious and simple" (Francis Maseres FRS, mathematician, 1759)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070316/f34c43f2/attachment-0001.bin>


More information about the libvir-list mailing list