]> granicus.if.org Git - php/commitdiff
- init err (and simplify)
authorPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 06:45:52 +0000 (06:45 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 06:45:52 +0000 (06:45 +0000)
ext/com_dotnet/com_olechar.c

index 657d45b55d25991a6f2277ceff283cfc03918f53..0599758d1e9e8f15ebb5ae35a288cc514338634a 100644 (file)
@@ -86,9 +86,7 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i
        }
 
        if (!ok) {
-               char *msg;
-               err = GetLastError();
-               msg = php_win32_error_to_msg(err);
+               char *msg = php_win32_error_to_msg(GetLastError());
 
                php_error_docref(NULL TSRMLS_CC, E_WARNING,
                        "Could not convert string from unicode: `%s'", msg);