New upstream version 16.11.7
[deb_dpdk.git] / lib / librte_eal / common / include / rte_common.h
index db5ac91..f5e2f88 100644 (file)
@@ -105,7 +105,7 @@ typedef uint16_t unaligned_uint16_t;
 /*********** Macros for pointer arithmetic ********/
 
 /**
- * add a byte-value offset from a pointer
+ * add a byte-value offset to a pointer
  */
 #define RTE_PTR_ADD(ptr, x) ((void*)((uintptr_t)(ptr) + (x)))
 
@@ -323,7 +323,7 @@ rte_pause(void) {}
 static inline uint32_t
 rte_bsf32(uint32_t v)
 {
-       return __builtin_ctz(v);
+       return (uint32_t)__builtin_ctz(v);
 }
 
 #ifndef offsetof