vim-patch:7.4.878 #4258

Problem:    Coverity error for clearing only one byte of struct.
Solution:   Clear the whole struct. (Dominique Pelle)

69b67f7e77
This commit is contained in:
watiko 2016-02-15 14:17:35 +09:00 committed by Justin M. Keyes
parent 2f98888db6
commit 2eb09c826d
2 changed files with 8 additions and 9 deletions

View File

@ -381,15 +381,14 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
suppress_errthrow = FALSE;
}
/*
* If requested, store and reset the global values controlling the
* exception handling (used when debugging). Otherwise clear it to avoid
* a bogus compiler warning when the optimizer uses inline functions...
*/
if (flags & DOCMD_EXCRESET)
// If requested, store and reset the global values controlling the
// exception handling (used when debugging). Otherwise clear it to avoid
// a bogus compiler warning when the optimizer uses inline functions...
if (flags & DOCMD_EXCRESET) {
save_dbg_stuff(&debug_saved);
else
memset(&debug_saved, 0, 1);
} else {
memset(&debug_saved, 0, sizeof(debug_saved));
}
initial_trylevel = trylevel;

View File

@ -412,7 +412,7 @@ static int included_patches[] = {
881,
// 880 NA
879,
// 878,
878,
877,
// 876 NA
// 875 NA