diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-03-07 17:45:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-03-07 17:45:11 +0000 |
commit | 960dcbd098c761dd623bec9492d5391ff6e8dceb (patch) | |
tree | df2abb6d73be0c31de679fa00251e133a0e99ab6 /src/gui_photon.c | |
parent | 14113fdf9cb3d588c0d1c3a210246b981cf5aad3 (diff) |
patch 9.0.1391: "clear" macros are not always usedv9.0.1391
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)
Diffstat (limited to 'src/gui_photon.c')
-rw-r--r-- | src/gui_photon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui_photon.c b/src/gui_photon.c index a17b4f5d03..0eb1282e06 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -1400,7 +1400,7 @@ gui_mch_browse( char_u *open_text = NULL; flags = 0; - memset(&file, 0, sizeof(file)); + CLEAR_FIELD(file); default_path = alloc(MAXPATHL + 1 + NAME_MAX + 1); if (default_path != NULL) @@ -1578,8 +1578,8 @@ gui_mch_dialog( PtModalCtrl_t modal_ctrl; PtDialogInfo_t di; - memset(&di, 0, sizeof(di)); - memset(&modal_ctrl, 0, sizeof(modal_ctrl)); + CLEAR_FIELD(di); + CLEAR_FIELD(modal_ctrl); n = 0; PtSetArg(&args[n++], Pt_ARG_GROUP_ROWS_COLS, 0, 0); @@ -1707,7 +1707,7 @@ gui_mch_iconify(void) { PhWindowEvent_t event; - memset(&event, 0, sizeof (event)); + CLEAR_FIELD(event); event.event_f = Ph_WM_HIDE; event.event_state = Ph_WM_EVSTATE_HIDE; event.rid = PtWidgetRid(gui.vimWindow); @@ -1723,7 +1723,7 @@ gui_mch_set_foreground(void) { PhWindowEvent_t event; - memset(&event, 0, sizeof (event)); + CLEAR_FIELD(event); event.event_f = Ph_WM_TOFRONT; event.event_state = Ph_WM_EVSTATE_FFRONT; event.rid = PtWidgetRid(gui.vimWindow); |