| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.108 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.108 |
| Problem: Useless check for NULL when calling vim_free(). |
| Solution: Remove the check. (Dominique Pelle) |
| Files: src/eval.c, src/ex_cmds.c, src/os_win32.c |
| |
| |
| |
| |
| |
| *** 5106,5114 **** |
| else |
| ret = OK; |
| } |
| ! |
| ! if (alias != NULL) |
| ! vim_free(alias); |
| } |
| |
| *arg = skipwhite(*arg); |
| --- 5106,5112 ---- |
| else |
| ret = OK; |
| } |
| ! vim_free(alias); |
| } |
| |
| *arg = skipwhite(*arg); |
| |
| *** 19807,19813 **** |
| EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); |
| return; |
| } |
| ! /* Don't allow hiding a function. When "v" is not NULL we migth be |
| * assigning another function to the same var, the type is checked |
| * below. */ |
| if (v == NULL && function_exists(name)) |
| --- 19805,19811 ---- |
| EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); |
| return; |
| } |
| ! /* Don't allow hiding a function. When "v" is not NULL we might be |
| * assigning another function to the same var, the type is checked |
| * below. */ |
| if (v == NULL && function_exists(name)) |
| |
| |
| |
| *** 5412,5418 **** |
| vir_T *virp; |
| int force; |
| { |
| ! if (old_sub != NULL && force) |
| vim_free(old_sub); |
| if (force || old_sub == NULL) |
| old_sub = viminfo_readstring(virp, 1, TRUE); |
| --- 5412,5418 ---- |
| vir_T *virp; |
| int force; |
| { |
| ! if (force) |
| vim_free(old_sub); |
| if (force || old_sub == NULL) |
| old_sub = viminfo_readstring(virp, 1, TRUE); |
| |
| |
| |
| *** 1886,1893 **** |
| cb->BufferSize.X = cb->Info.dwSize.X; |
| cb->BufferSize.Y = cb->Info.dwSize.Y; |
| NumCells = cb->BufferSize.X * cb->BufferSize.Y; |
| ! if (cb->Buffer != NULL) |
| ! vim_free(cb->Buffer); |
| cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); |
| if (cb->Buffer == NULL) |
| return FALSE; |
| --- 1886,1892 ---- |
| cb->BufferSize.X = cb->Info.dwSize.X; |
| cb->BufferSize.Y = cb->Info.dwSize.Y; |
| NumCells = cb->BufferSize.X * cb->BufferSize.Y; |
| ! vim_free(cb->Buffer); |
| cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); |
| if (cb->Buffer == NULL) |
| return FALSE; |
| |
| |
| |
| *** 716,717 **** |
| --- 716,719 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 108, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 173. You keep tracking down the email addresses of all your friends |
| (even childhood friends). |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |