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; suppress_errthrow = FALSE;
} }
/* // If requested, store and reset the global values controlling the
* If requested, store and reset the global values controlling the // exception handling (used when debugging). Otherwise clear it to avoid
* exception handling (used when debugging). Otherwise clear it to avoid // a bogus compiler warning when the optimizer uses inline functions...
* a bogus compiler warning when the optimizer uses inline functions... if (flags & DOCMD_EXCRESET) {
*/
if (flags & DOCMD_EXCRESET)
save_dbg_stuff(&debug_saved); save_dbg_stuff(&debug_saved);
else } else {
memset(&debug_saved, 0, 1); memset(&debug_saved, 0, sizeof(debug_saved));
}
initial_trylevel = trylevel; initial_trylevel = trylevel;

View File

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