Skip to content
This repository

Dead code #18

Merged
merged 1 commit into from about 2 years ago

2 participants

Ross Lagerwall Alvaro Lopez Ortega
Ross Lagerwall

This commit removes unnecessary epoll code when EPOLL_CTL_DEL is used.

When EPOLL_CTL_DEL is used, the epoll_event is ignored and so it does not neeed to be initialized. In fact, for Linux 2.6.9+, NULL can be passed in. However, before that, a struct epoll_event was needed (although it did not need to be initialized).

Ross Lagerwall Remove unnecessary epoll code when EPOLL_CTL_DEL is used.
When EPOLL_CTL_DEL is used, the epoll_event is ignored and so it does not need
to be initialized.
00c232a
Alvaro Lopez Ortega
Owner

Good point. Thank you Ross!!

Alvaro Lopez Ortega alobbs merged commit 02fd55f into from February 09, 2012
Alvaro Lopez Ortega alobbs closed this February 09, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 09, 2012
Ross Lagerwall Remove unnecessary epoll code when EPOLL_CTL_DEL is used.
When EPOLL_CTL_DEL is used, the epoll_event is ignored and so it does not need
to be initialized.
00c232a
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 0 additions and 4 deletions. Show diff stats Hide diff stats

  1. 4  cherokee/fdpoll-epoll.c
4  cherokee/fdpoll-epoll.c
@@ -128,10 +128,6 @@ _del (cherokee_fdpoll_epoll_t *fdp, int fd)
128 128
 {
129 129
 	struct epoll_event ev;
130 130
 
131  
-	ev.events   = 0;
132  
-	ev.data.u64 = 0;  /* <- I just wanna be sure there aren't */
133  
-	ev.data.fd  = fd; /* <- 4 bytes uninitialized */
134  
-
135 131
 	/* Check the fd limit
136 132
 	 */
137 133
 	if (unlikely (cherokee_fdpoll_is_empty (FDPOLL(fdp)))) {
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.