comparison src/sign.c @ 20007:aadd1cae2ff5 v8.2.0559

patch 8.2.0559: clearing a struct is verbose Commit: https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 12 19:37:17 2020 +0200 patch 8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
author Bram Moolenaar <Bram@vim.org>
date Sun, 12 Apr 2020 19:45:05 +0200
parents 435726a03481
children 9064044fd4f6
comparison
equal deleted inserted replaced
20006:aee3c9266968 20007:aadd1cae2ff5
487 { 487 {
488 sign_entry_T *sign; 488 sign_entry_T *sign;
489 sign_T *sp; 489 sign_T *sp;
490 buf_T *buf = wp->w_buffer; 490 buf_T *buf = wp->w_buffer;
491 491
492 vim_memset(sattr, 0, sizeof(sign_attrs_T)); 492 CLEAR_POINTER(sattr);
493 493
494 FOR_ALL_SIGNS_IN_BUF(buf, sign) 494 FOR_ALL_SIGNS_IN_BUF(buf, sign)
495 { 495 {
496 if (sign->se_lnum > lnum) 496 if (sign->se_lnum > lnum)
497 // Signs are sorted by line number in the buffer. No need to check 497 // Signs are sorted by line number in the buffer. No need to check