New upstream version 17.11.1
[deb_dpdk.git] / lib / librte_timer / rte_timer.c
index 28decc3..ba436cd 100644 (file)
@@ -195,7 +195,7 @@ timer_set_running_state(struct rte_timer *tim)
 
 /*
  * Return a skiplist level for a new entry.
- * This probabalistically gives a level with p=1/4 that an entry at level n
+ * This probabilistically gives a level with p=1/4 that an entry at level n
  * will also appear at level n+1.
  */
 static uint32_t
@@ -432,7 +432,7 @@ rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
 
        if (unlikely((tim_lcore != (unsigned)LCORE_ID_ANY) &&
                        !(rte_lcore_is_enabled(tim_lcore) ||
-                               rte_lcore_has_role(tim_lcore, ROLE_SERVICE))))
+                         rte_lcore_has_role(tim_lcore, ROLE_SERVICE) == 0)))
                return -1;
 
        if (type == PERIODICAL)