DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] enic: Changed ENIC_ALIGN to unisgned long to prevent possible data loss
Date: Fri, 20 Feb 2015 16:13:33 +0000	[thread overview]
Message-ID: <1424448813-6178-1-git-send-email-maciejx.t.gajdzica@intel.com> (raw)

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(-)

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
-- 
1.7.9.5

                 reply	other threads:[~2015-02-20 16:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424448813-6178-1-git-send-email-maciejx.t.gajdzica@intel.com \
    --to=maciejx.t.gajdzica@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).