pajoye                                   Thu, 20 Jan 2011 06:45:52 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=307613

Log:
- init err (and simplify)

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/com_dotnet/com_olechar.c
    U   php/php-src/trunk/ext/com_dotnet/com_olechar.c

Modified: php/php-src/branches/PHP_5_3/ext/com_dotnet/com_olechar.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/com_dotnet/com_olechar.c   2011-01-20 
06:44:16 UTC (rev 307612)
+++ php/php-src/branches/PHP_5_3/ext/com_dotnet/com_olechar.c   2011-01-20 
06:45:52 UTC (rev 307613)
@@ -79,7 +79,6 @@
                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 @@
        }

        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);

Modified: php/php-src/trunk/ext/com_dotnet/com_olechar.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_olechar.c      2011-01-20 06:44:16 UTC 
(rev 307612)
+++ php/php-src/trunk/ext/com_dotnet/com_olechar.c      2011-01-20 06:45:52 UTC 
(rev 307613)
@@ -86,9 +86,7 @@
        }

        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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to