[dpdk-dev] enic: Changed ENIC_ALIGN to unisgned long to prevent possible data loss

Message ID 1424448813-6178-1-git-send-email-maciejx.t.gajdzica@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Maciej Gajdzica Feb. 20, 2015, 4:13 p.m. UTC
  Define ENIC_ALIGN is used only by function rte_memzone_reserve_aligned,
which expects argument of type unsigned. Defined constant is of type
unsigned long long. Changed type to unsigned long to prevent possible
loss of precision. Issue found with static code analysis tool.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
---
 lib/librte_pmd_enic/enic_compat.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h
index b1af838..bf2f1af 100644
--- a/lib/librte_pmd_enic/enic_compat.h
+++ b/lib/librte_pmd_enic/enic_compat.h
@@ -42,7 +42,7 @@ 
 #include <rte_atomic.h>
 #include <rte_malloc.h>
 
-#define ENIC_PAGE_ALIGN 4096ULL
+#define ENIC_PAGE_ALIGN 4096UL
 #define ENIC_ALIGN      ENIC_PAGE_ALIGN
 #define NAME_MAX        255
 #define ETH_ALEN        6