]> 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 eb8baf1b969a38b771cf2738c83e4e916beab5bb..1cd853b794a050f0aae6306ac7511b52cbacbdba 100644 (file)
@@ -79,7 +79,6 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i
                length = WideCharToMultiByte(codepage, 0, olestring, -1, string, length, NULL, NULL);
                ok = length > 0;
        } else {
-               err = GetLastError();
                string = (char*)emalloc(sizeof(char));
                *string = '\0';
                ok = FALSE;
@@ -87,7 +86,7 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i
        }
 
        if (!ok) {
-               char *msg = php_win_err(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);