X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Frte_service.c;fp=lib%2Flibrte_eal%2Fcommon%2Frte_service.c;h=6967ea321d848199e7920aec040d76e1ee271420;hb=808f793d74d50ddefd6150c2989e7404aef78358;hp=36f9213fcf6622c96bd52907670892829950efd8;hpb=2a9549ca3b5b3a5233c6f2a1fe5953b62f39d680;p=dpdk.git diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 36f9213fcf..6967ea321d 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -163,7 +163,7 @@ service_stats_enabled(struct rte_service_spec_impl *impl) static inline int service_mt_safe(struct rte_service_spec_impl *s) { - return s->spec.capabilities & RTE_SERVICE_CAP_MT_SAFE; + return !!(s->spec.capabilities & RTE_SERVICE_CAP_MT_SAFE); } int32_t rte_service_set_stats_enable(uint32_t id, int32_t enabled) @@ -215,7 +215,7 @@ rte_service_probe_capability(uint32_t id, uint32_t capability) { struct rte_service_spec_impl *s; SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL); - return s->spec.capabilities & capability; + return !!(s->spec.capabilities & capability); } int32_t @@ -476,7 +476,7 @@ service_update(struct rte_service_spec *service, uint32_t lcore, } if (enabled) - *enabled = (lcore_states[lcore].service_mask & (sid_mask)); + *enabled = !!(lcore_states[lcore].service_mask & (sid_mask)); rte_smp_wmb();