summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2018-05-14 13:00:37 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-14 23:32:23 +0200
commit0fa4f3eeefb3e76124f5bbc1fccedcf43f4503f3 (patch)
treec99c3161fc57e600a29c49a53e672075dc6f586c
parent1bcb5ecb179cbca81ff3fe15432326c1c3ca9e9b (diff)
downloaddpdk-0fa4f3eeefb3e76124f5bbc1fccedcf43f4503f3.zip
dpdk-0fa4f3eeefb3e76124f5bbc1fccedcf43f4503f3.tar.gz
dpdk-0fa4f3eeefb3e76124f5bbc1fccedcf43f4503f3.tar.xz
net/qede: replace strncpy by strlcpy
Fixes: 8427c6647964 ("net/qede/base: add attention formatting string") Cc: stable@dpdk.org Signed-off-by: Andy Green <andy@warmcat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--drivers/net/qede/base/ecore_int.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index f43781b..d9e22b5 100644
--- a/drivers/net/qede/base/ecore_int.c
+++ b/drivers/net/qede/base/ecore_int.c
@@ -6,6 +6,8 @@
* See LICENSE.qede_pmd for copyright and licensing details.
*/
+#include <rte_string_fns.h>
+
#include "bcm_osal.h"
#include "ecore.h"
#include "ecore_spq.h"
@@ -1104,9 +1106,9 @@ static enum _ecore_status_t ecore_int_deassertion(struct ecore_hwfn *p_hwfn,
p_aeu->bit_name,
num);
else
- OSAL_STRNCPY(bit_name,
- p_aeu->bit_name,
- 30);
+ strlcpy(bit_name,
+ p_aeu->bit_name,
+ sizeof(bit_name));
/* We now need to pass bitmask in its
* correct position.