Mercurial > vim
comparison src/debugger.c @ 32120:97255d909654 v9.0.1391
patch 9.0.1391: "clear" macros are not always used
Commit: https://github.com/vim/vim/commit/960dcbd098c761dd623bec9492d5391ff6e8dceb
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Mar 7 17:45:11 2023 +0000
patch 9.0.1391: "clear" macros are not always used
Problem: "clear" macros are not always used.
Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
places. (Yegappan Lakshmanan, closes #12104)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Mar 2023 19:00:04 +0100 |
parents | 4545f58c8490 |
children | 87f59a64efab |
comparison
equal
deleted
inserted
replaced
32119:241396c61b36 | 32120:97255d909654 |
---|---|
95 if (!debug_did_msg) | 95 if (!debug_did_msg) |
96 msg(_("Entering Debug mode. Type \"cont\" to continue.")); | 96 msg(_("Entering Debug mode. Type \"cont\" to continue.")); |
97 if (debug_oldval != NULL) | 97 if (debug_oldval != NULL) |
98 { | 98 { |
99 smsg(_("Oldval = \"%s\""), debug_oldval); | 99 smsg(_("Oldval = \"%s\""), debug_oldval); |
100 vim_free(debug_oldval); | 100 VIM_CLEAR(debug_oldval); |
101 debug_oldval = NULL; | |
102 } | 101 } |
103 if (debug_newval != NULL) | 102 if (debug_newval != NULL) |
104 { | 103 { |
105 smsg(_("Newval = \"%s\""), debug_newval); | 104 smsg(_("Newval = \"%s\""), debug_newval); |
106 vim_free(debug_newval); | 105 VIM_CLEAR(debug_newval); |
107 debug_newval = NULL; | |
108 } | 106 } |
109 sname = estack_sfile(ESTACK_NONE); | 107 sname = estack_sfile(ESTACK_NONE); |
110 if (sname != NULL) | 108 if (sname != NULL) |
111 msg((char *)sname); | 109 msg((char *)sname); |
112 vim_free(sname); | 110 vim_free(sname); |