eal: explicit cast of strlcpy return
authorAndy Green <andy@warmcat.com>
Thu, 17 May 2018 14:03:48 +0000 (22:03 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 20 May 2018 22:19:08 +0000 (00:19 +0200)
commit622a7305d1fd1e0150034b82ef92e62250befcd8
tree0b1d7fa14de3da772781e2001fd91e53058cd704
parenta2ff2827dc84b3acbb2270c49b4b0a82a09712cb
eal: explicit cast of strlcpy return

GCC 8.1 warns:
rte_string_fns.h: In function 'rte_strlcpy':
rte_string_fns.h:58:9:
warning: conversion to 'size_t' {aka 'long unsigned int'} from
'int' may change the sign of the result [-Wsign-conversion]
  return snprintf(dst, size, "%s", src);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 5364de644a4b ("eal: support strlcpy function")

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/include/rte_string_fns.h