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

Re: [libvirt] [PATCH] esx: Handle non-UTF-8 encoded VMX files



 On 10/18/2010 11:22 AM, Eric Blake wrote:
On 10/16/2010 12:37 PM, Matthias Bolte wrote:
ESX(i) uses UTF-8, but a Windows based GSX server writes
Windows-1252 encoded VMX files.

Add a test case to ensure that libxml2 provides Windows-1252
to UTF-8 conversion.
---


+
+    if (result == NULL) {
+        virReportOOMError();
+        goto cleanup;
+    }
+
+  cleanup:

Is that last goto necessary, since the label is reached next anyways?

Maybe this is a defensive goto, assuming that someday someone may add extra code after that if clause. And for the moment it's just a single jmp that gets optimized out. (kind of like putting a break on the last case of a switch statement. It doesn't do anything now, but may save your bacon later if Ralph Wiggum goes playing in your code ;-))


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