From 0987d19712e0934870932394ec41e77ea6a2bfc8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 28 May 2014 18:26:11 +0200 Subject: [PATCH] Use zend_long_to_str in pcntl --- ext/pcntl/pcntl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); } -- 2.50.1