* [dpdk-dev] [PATCH] enic: changed type of field ig_vlan_strip_en in struct enic to prevent possible data loss
@ 2015-02-20 16:13 Maciej Gajdzica
0 siblings, 0 replies; only message in thread
From: Maciej Gajdzica @ 2015-02-20 16:13 UTC (permalink / raw)
To: dev
Field ig_vlan_strip_en in struct enic type is int. It is used only by
function enic_set_nic_cfg which expects uint_8 as argument. Changed type
of the field 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.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h
index c43417c..1d16a29 100644
--- a/lib/librte_pmd_enic/enic.h
+++ b/lib/librte_pmd_enic/enic.h
@@ -110,7 +110,7 @@ struct enic {
pthread_t err_intr_thread;
int promisc;
int allmulti;
- int ig_vlan_strip_en;
+ uint8_t ig_vlan_strip_en;
int link_status;
u8 hw_ip_checksum;
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-20 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 16:13 [dpdk-dev] [PATCH] enic: changed type of field ig_vlan_strip_en in struct enic to prevent possible data loss Maciej Gajdzica
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).