]> granicus.if.org Git - php/commitdiff
Fixed compiler warning.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 22 Mar 2005 14:44:23 +0000 (14:44 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 22 Mar 2005 14:44:23 +0000 (14:44 +0000)
ext/standard/microtime.c

index 58cc6744e191b67dfc114d1c0f9f4d539f74aa68..2ad5603f5569eb2017814f84c4addf4a3a19ad71 100644 (file)
@@ -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;
        }