]> granicus.if.org Git - php/commitdiff
Fix warning.
authorAndrei Zmievski <andrei@php.net>
Wed, 20 Dec 2006 20:42:50 +0000 (20:42 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 20 Dec 2006 20:42:50 +0000 (20:42 +0000)
Zend/zend_alloc.c

index 2509899af36626257066deb43b106b5e79386eda..0dc91d0233f1777aa7ee4b8d34dad9a75fcddbf6 100644 (file)
@@ -2035,11 +2035,13 @@ ZEND_API UChar *zend_ustrndup(const UChar *s, uint length)
 
 ZEND_API zstr zend_zstrndup(int type, const zstr s, uint length)
 {
+       zstr result;
        if (type == IS_STRING) {
-               return zend_strndup(s.s, length);
+               result.s = zend_strndup(s.s, length);
        } else {
-               return zend_ustrndup(s.u, length);
+               result.u = zend_ustrndup(s.u, length);
        }
+       return result;
 }
 
 ZEND_API int zend_set_memory_limit(unsigned int memory_limit)