summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-03-22 14:44:23 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2005-03-22 14:44:23 (GMT)
commit7af2c5e44b8933e9b1bb3da65dec6d6196a0d3cc (patch)
treef822a7efc38a662693a2a34d4082325b82b79c5f /ext
parentdce82da87d42d1e8ca9cf2f9e88133605ace00b4 (diff)
downloadphp-7af2c5e44b8933e9b1bb3da65dec6d6196a0d3cc.tar.gz
Fixed compiler warning.
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/microtime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 58cc674..2ad5603 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;
}