[OpenWrt-Devel] [PATCH 4/5] ustream-fd: readability change.

Yousong Zhou yszhou4tech at gmail.com
Thu Jun 4 09:41:41 EDT 2015


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 ustream-fd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ustream-fd.c b/ustream-fd.c
index bc44d4a..daef499 100644
--- a/ustream-fd.c
+++ b/ustream-fd.c
@@ -119,7 +119,8 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events)
 		ustream_fd_read_pending(sf, &more);
 
 	if (events & ULOOP_WRITE) {
-		if (ustream_write_pending(s))
+		bool no_more = ustream_write_pending(s);
+		if (no_more)
 			ustream_fd_set_uloop(s, false);
 	}
 
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list