mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 16:14:03 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user