mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fixed compiler warning.
This commit is contained in:
parent
dce82da87d
commit
7af2c5e44b
1 changed files with 3 additions and 1 deletions
|
@ -107,7 +107,7 @@ PHP_FUNCTION(gettimeofday)
|
||||||
Returns an array of usage statistics */
|
Returns an array of usage statistics */
|
||||||
PHP_FUNCTION(getrusage)
|
PHP_FUNCTION(getrusage)
|
||||||
{
|
{
|
||||||
struct rusage usg = {0};
|
struct rusage usg;
|
||||||
long pwho = 0;
|
long pwho = 0;
|
||||||
int who = RUSAGE_SELF;
|
int who = RUSAGE_SELF;
|
||||||
|
|
||||||
|
@ -115,6 +115,8 @@ PHP_FUNCTION(getrusage)
|
||||||
who = RUSAGE_CHILDREN;
|
who = RUSAGE_CHILDREN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&usg, 0, sizeof(struct rusage));
|
||||||
|
|
||||||
if (getrusage(who, &usg) == -1) {
|
if (getrusage(who, &usg) == -1) {
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue