Преглед на файлове

[LibOS] Simplify condition expression

`polls + npolls` is less confusing and simpler than `&polls[npolls]`.

Signed-off-by: Gary <gang1.wang@intel.com>
Gary преди 7 години
родител
ревизия
6a09032f2d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      LibOS/shim/src/sys/shim_poll.c

+ 1 - 1
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;