nat: Please coverity and initialize the saveptr to NULL

Coverity complains about the saveptr used in the strtok_r. This
is not a bug because we pass a string as part of the first call
to strtok_r but it is easier to just initialize it.

Addresses: Coverity CID 1042323
This commit is contained in:
Holger Hans Peter Freyther 2013-07-05 07:45:08 +02:00
parent 9feef48eaf
commit b0b8a34dd5
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ static int forward_to_bsc(struct ctrl_cmd *cmd)
struct bsc_connection *bsc;
struct bsc_cmd_list *pending;
unsigned int nr;
char *nr_str, *tmp, *saveptr;
char *nr_str, *tmp, *saveptr = NULL;
/* Skip over the beginning (bsc.) */
tmp = strtok_r(cmd->variable, ".", &saveptr);