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)
diff --git a/src/os_qnx.c b/src/os_qnx.c
index 4a7b363..d3ebb20 100644
--- a/src/os_qnx.c
+++ b/src/os_qnx.c
@@ -24,7 +24,7 @@
#if defined(FEAT_GUI_PHOTON)
PhChannelParms_t parms;
- memset(&parms, 0, sizeof(parms));
+ CLEAR_FIELD(parms);
parms.flags = Ph_DYNAMIC_BUFFER;
is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
@@ -124,7 +124,7 @@
if (text_clip && vim_clip)
{
- memset(clip_header, 0, sizeof(clip_header));
+ CLEAR_FIELD(clip_header);
STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
clip_header[0].length = sizeof(vim_clip);