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/hardcopy.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/hardcopy.c')
-rw-r--r-- | src/hardcopy.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/hardcopy.c b/src/hardcopy.c index f6be017c33..e91a7dc2d7 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -2721,14 +2721,10 @@ mch_print_begin(prt_settings_T *psettings) struct prt_ps_resource_S *res_cmap; int retval = FALSE; - res_prolog = (struct prt_ps_resource_S *) - alloc(sizeof(struct prt_ps_resource_S)); - res_encoding = (struct prt_ps_resource_S *) - alloc(sizeof(struct prt_ps_resource_S)); - res_cidfont = (struct prt_ps_resource_S *) - alloc(sizeof(struct prt_ps_resource_S)); - res_cmap = (struct prt_ps_resource_S *) - alloc(sizeof(struct prt_ps_resource_S)); + res_prolog = ALLOC_ONE(struct prt_ps_resource_S); + res_encoding = ALLOC_ONE(struct prt_ps_resource_S); + res_cidfont = ALLOC_ONE(struct prt_ps_resource_S); + res_cmap = ALLOC_ONE(struct prt_ps_resource_S); if (res_prolog == NULL || res_encoding == NULL || res_cidfont == NULL || res_cmap == NULL) goto theend; |