0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4023: using uninitialized variable

Problem:    Using uninitialized variable.
Solution:   Initialize "ufunc" also when an item is not exported.
This commit is contained in:
Bram Moolenaar
2022-01-06 22:07:57 +00:00
parent 11de43d2d4
commit a909c48bec
2 changed files with 3 additions and 1 deletions

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4023,
/**/ /**/
4022, 4022,
/**/ /**/

View File

@@ -565,6 +565,7 @@ find_exported(
if (idx >= 0) if (idx >= 0)
{ {
sv = ((svar_T *)script->sn_var_vals.ga_data) + idx; sv = ((svar_T *)script->sn_var_vals.ga_data) + idx;
*ufunc = NULL;
if (!sv->sv_export) if (!sv->sv_export)
{ {
if (verbose) if (verbose)
@@ -572,7 +573,6 @@ find_exported(
return -1; return -1;
} }
*type = sv->sv_type; *type = sv->sv_type;
*ufunc = NULL;
} }
else else
{ {