]> granicus.if.org Git - php/commitdiff
initialize errno
authorAntony Dovgal <tony2001@php.net>
Wed, 24 Jan 2007 00:33:44 +0000 (00:33 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 24 Jan 2007 00:33:44 +0000 (00:33 +0000)
ext/iconv/iconv.c

index d6dd2af6bc8a80931bd6cb658949467d09a4a8f6..dab137a4aada966ca910480c2fe674010370ee99 100644 (file)
@@ -784,6 +784,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval,
        }
 
        cd2 = (iconv_t)NULL;
+       errno = 0;
 
        for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0 && len > 0; ++cnt) {
                size_t prev_in_left;