From 57e7e4921f2df332f95d68154b25fc663f3a57fe Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Wed, 20 Dec 2006 20:42:50 +0000 Subject: [PATCH] Fix warning. --- Zend/zend_alloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.50.1