"Tijl Coosemans" tijl@ulyssis.org wrote:
hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW); if (hr != S_OK)
return hr;
goto cleanup; hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
+cleanup: HeapFree(GetProcessHeap(), 0, pDstStrW); return hr; }
This is a bikeshed issue really, but I wonder what Wine's policy on gotos like this is. Imo, it's better to add the HeapFree call to the if block and let the compiler work it out.
In this particular case goto should be avoided IMO by rewriting code snippet like below:
if (hr == S_OK) hr = ConvertINetUnicodeToMultiByte(...);