From: Ilia Alshanetsky Date: Tue, 22 Mar 2005 14:44:23 +0000 (+0000) Subject: Fixed compiler warning. X-Git-Tag: php-5.0.1b1~714 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7af2c5e44b8933e9b1bb3da65dec6d6196a0d3cc;p=php Fixed compiler warning. --- diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 58cc6744e1..2ad5603f55 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -107,7 +107,7 @@ PHP_FUNCTION(gettimeofday) Returns an array of usage statistics */ PHP_FUNCTION(getrusage) { - struct rusage usg = {0}; + struct rusage usg; long pwho = 0; int who = RUSAGE_SELF; @@ -115,6 +115,8 @@ PHP_FUNCTION(getrusage) who = RUSAGE_CHILDREN; } + memset(&usg, 0, sizeof(struct rusage)); + if (getrusage(who, &usg) == -1) { RETURN_FALSE; }