cvs: php-src /ext/standard microtime.c
| From: | Ilia Alshanetsky | Date: | Tue, 22 Mar 2005 14:44:23 +0000 |
| Subject: | cvs: php-src /ext/standard microtime.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31058@lists.php.net to get a copy of this message | ||
iliaa Tue Mar 22 09:44:23 2005 EDT
Modified files:
/php-src/ext/standard microtime.c
Log:
Fixed compiler warning.
http://cvs.php.net/diff.php/php-src/ext/standard/microtime.c?r1=1.51&r2=1.52&ty=u
Index: php-src/ext/standard/microtime.c
diff -u php-src/ext/standard/microtime.c:1.51 php-src/ext/standard/microtime.c:1.52
--- php-src/ext/standard/microtime.c:1.51 Tue Mar 1 16:32:25 2005
+++ php-src/ext/standard/microtime.c Tue Mar 22 09:44:23 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.c,v 1.51 2005/03/01 21:32:25 iliaa Exp $ */
+/* $Id: microtime.c,v 1.52 2005/03/22 14:44:23 iliaa Exp $ */
#include "php.h"
@@ -107,7 +107,7 @@
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 @@
who = RUSAGE_CHILDREN;
}
+ memset(&usg, 0, sizeof(struct rusage));
+
if (getrusage(who, &usg) == -1) {
RETURN_FALSE;
}