kvargs: fix build with gcc 4.5.1

GCC 4.5.1 warns about an uninitialized pointer:
	error: 'ctx1' may be used uninitialized in this function

Signed-off-by: Min Cao <min.cao@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
This commit is contained in:
Min Cao 2014-06-16 11:22:11 +08:00 committed by Thomas Monjalon
parent 00685b0fe2
commit 1122f06c42

View File

@ -48,7 +48,9 @@ static int
rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params)
{
unsigned i;
char *str, *ctx1, *ctx2;
char *str;
char *ctx1 = NULL;
char *ctx2 = NULL;
/* Copy the const char *params to a modifiable string
* to pass to rte_strsplit