On Fri, 27 Apr 2018 01:03:31 +0300
Medvedkin Vladimir <[email protected]> wrote:
> +/**
> + * Check if prefix1 {key1/depth1}
> + * is covered by prefix2 {key2/depth2}
> + */
> +static inline int __attribute__((pure))
> +rte_rib_is_covered(uint32_t key1, uint8_t depth1, uint32_t key2, uint8_t
> depth2)
> +{
> + return ((((key1 ^ key2) & rte_rib_depth_to_mask(depth2)) == 0)
> + && (depth1 > depth2));
> +}
Use standard boolean type (bool) for these kind of functions.
Plus you really don't need the pure attribute for static (or inline) functions
since compiler determines that itself.