In the no-x86 branch, a parentheses is missing.
And need to include <limits.h> header to use CHAR_BIT.
Fixes:
49361c3f3cfa ("hash: remove duplicated code")
Signed-off-by: Bruce Liu <2103458176@qq.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
#include <stdint.h>
#include <string.h>
+#include <limits.h>
#include <rte_log.h>
#include <rte_byteorder.h>
const uint32_t *k = key;
const uint32_t s = 0;
#else
- const uint32_t *k = (uint32_t *)(uintptr_t)key & (uintptr_t)~3);
+ const uint32_t *k = (uint32_t *)((uintptr_t)key & (uintptr_t)~3);
const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT;
#endif
if (!check_align || s == 0) {