From: Andrei Zmievski Date: Wed, 20 Dec 2006 20:42:50 +0000 (+0000) Subject: Fix warning. X-Git-Tag: RELEASE_1_0_0RC1~608 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57e7e4921f2df332f95d68154b25fc663f3a57fe;p=php Fix warning. --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 2509899af3..0dc91d0233 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -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)