com php-src: Make valgrind happy: sapi/fpm/fpm/events/epoll.c
| From: | Dmitry Stogov | Date: | Wed, 15 Apr 2015 11:20:59 +0000 |
| Subject: | com php-src: Make valgrind happy: sapi/fpm/fpm/events/epoll.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86279@lists.php.net to get a copy of this message | ||
Commit: ec077328fd1c0753559fa727115446ea1b0147e5
Author: Dmitry Stogov <dmitry@zend.com> Wed, 15 Apr 2015 14:20:59 +0300
Parents: 8144795133b0a1c38227e733c42597cad35bf766
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ec077328fd1c0753559fa727115446ea1b0147e5
Log:
Make valgrind happy
Changed paths:
M sapi/fpm/fpm/events/epoll.c
Diff:
diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c
index 8b7e476..8a3c530 100644
--- a/sapi/fpm/fpm/events/epoll.c
+++ b/sapi/fpm/fpm/events/epoll.c
@@ -164,6 +164,10 @@ static int fpm_event_epoll_add(struct fpm_event_s *ev) /* {{{ */
struct epoll_event e;
/* fill epoll struct */
+#if SIZEOF_SIZE_T == 4
+ /* Completely initialize event data to prevent valgrind reports */
+ e.data.u64 = 0;
+#endif
e.events = EPOLLIN;
e.data.fd = ev->fd;
e.data.ptr = (void *)ev;