[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Use bitwise masking to turn off bits, not compare-and-subtr...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Use bitwise masking to turn off bits, not compare-and-subtr...
- From: nickm@seul.org (Nick Mathewson)
- Date: Wed, 20 Oct 2004 19:15:52 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 20 Oct 2004 19:16:08 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv8381/src/or
Modified Files:
main.c
Log Message:
Use bitwise masking to turn off bits, not compare-and-subtract
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -d -r1.336 -r1.337
--- main.c 17 Oct 2004 21:51:20 -0000 1.336
+++ main.c 20 Oct 2004 23:15:49 -0000 1.337
@@ -191,8 +191,7 @@
tor_assert(conn->poll_index < nfds);
log(LOG_DEBUG,"connection_stop_reading() called.");
- if(poll_array[conn->poll_index].events & POLLIN)
- poll_array[conn->poll_index].events -= POLLIN;
+ poll_array[conn->poll_index].events &= ~POLLIN;
}
/** Tell the main loop to start notifying <b>conn</b> of any read events. */
@@ -213,8 +212,7 @@
tor_assert(conn);
tor_assert(conn->poll_index >= 0);
tor_assert(conn->poll_index < nfds);
- if(poll_array[conn->poll_index].events & POLLOUT)
- poll_array[conn->poll_index].events -= POLLOUT;
+ poll_array[conn->poll_index].events &= ~POLLOUT;
}
/** Tell the main loop to start notifying <b>conn</b> of any write events. */