From: Nikita Popov Date: Wed, 28 May 2014 16:26:11 +0000 (+0200) Subject: Use zend_long_to_str in pcntl X-Git-Tag: POST_PHPNG_MERGE~252 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0987d19712e0934870932394ec41e77ea6a2bfc8;p=php Use zend_long_to_str in pcntl --- diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 4e125e5c1e..5de4ae1cd4 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -790,9 +790,7 @@ PHP_FUNCTION(pcntl_exec) ZEND_HASH_FOREACH_KEY_VAL(envs_hash, key_num, key, element) { if (envi >= envc) break; if (!key) { - key = STR_ALLOC(101, 0); - snprintf(key->val, 100, "%ld", key_num); - key->len = strlen(key->val); + key = zend_long_to_str(key_num); } else { STR_ADDREF(key); }