From 6a09032f2d2fc86014520db5600a24eca4982df8 Mon Sep 17 00:00:00 2001 From: Gary Date: Wed, 5 Dec 2018 11:25:14 -0800 Subject: [PATCH] [LibOS] Simplify condition expression `polls + npolls` is less confusing and simpler than `&polls[npolls]`. Signed-off-by: Gary --- LibOS/shim/src/sys/shim_poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibOS/shim/src/sys/shim_poll.c b/LibOS/shim/src/sys/shim_poll.c index 59aef0d2..91621533 100644 --- a/LibOS/shim/src/sys/shim_poll.c +++ b/LibOS/shim/src/sys/shim_poll.c @@ -126,7 +126,7 @@ static int __do_poll (int npolls, struct poll_handle * polls, lock(map->lock); - for (p = polls ; p < &polls[npolls] ; p++) { + for (p = polls ; p < polls + npolls ; p++) { bool do_r = p->flags & DO_R; bool do_w = p->flags & DO_W;