[dpdk-dev] [PATCH v3 40/40] rte_string_fns.h: explicit cast for int return to size_t
Andy Green
andy at warmcat.com
Thu May 10 04:49:40 CEST 2018
Signed-off-by: Andy Green <andy at warmcat.com>
---
lib/librte_eal/common/include/rte_string_fns.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_eal/common/include/rte_string_fns.h
index fcbb42e00..51413a55e 100644
--- a/lib/librte_eal/common/include/rte_string_fns.h
+++ b/lib/librte_eal/common/include/rte_string_fns.h
@@ -55,7 +55,7 @@ rte_strsplit(char *string, int stringlen,
static inline size_t
rte_strlcpy(char *dst, const char *src, size_t size)
{
- return snprintf(dst, size, "%s", src);
+ return (size_t)(unsigned int)snprintf(dst, size, "%s", src);
}
/* pull in a strlcpy function */
More information about the dev
mailing list