mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 11:48:50 +00:00
Merge pull request #2503 from pacovn/Coverity_1469898_Uninitialized_scalar_variable
lib: uninitialized variable (2) (Coverity 1469898)
This commit is contained in:
commit
cf6bc77d28
@ -261,8 +261,11 @@ void print_version(const char *progname)
|
||||
|
||||
char *argv_concat(struct cmd_token **argv, int argc, int shift)
|
||||
{
|
||||
int cnt = argc - shift;
|
||||
const char *argstr[cnt];
|
||||
int cnt = MAX(argc - shift, 0);
|
||||
const char *argstr[cnt + 1];
|
||||
|
||||
if (!cnt)
|
||||
return NULL;
|
||||
|
||||
for (int i = 0; i < cnt; i++)
|
||||
argstr[i] = argv[i + shift]->arg;
|
||||
|
Loading…
Reference in New Issue
Block a user