diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-08 15:03:25 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-17 07:02:44 -0300 |
commit | 5209d2271b5e66ea3da0fc9056f99b8cafc14aa6 (patch) | |
tree | 3202016b0c15f7c14561bfaa25d8109057df6c97 /src/nvim/ex_cmds2.c | |
parent | b4efff652388260b548324f870201a5804e097f0 (diff) | |
download | rneovim-5209d2271b5e66ea3da0fc9056f99b8cafc14aa6.tar.gz rneovim-5209d2271b5e66ea3da0fc9056f99b8cafc14aa6.tar.bz2 rneovim-5209d2271b5e66ea3da0fc9056f99b8cafc14aa6.zip |
Replace ga->ga_len == 0 checks with GA_EMPTY(ga)
Used Coccinelle to perform the changes
@@
expression E;
@@
<...
(
// E.ga_len == 0 is isomorphic to !E.ga_len
- E.ga_len == 0
+ GA_EMPTY(&E)
|
- E->ga_len == 0
+ GA_EMPTY(E)
)
...>
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 33fa7c3f30..3f20c59b2b 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -594,7 +594,7 @@ void ex_breakdel(exarg_T *eap) } /* If all breakpoints were removed clear the array. */ - if (gap->ga_len == 0) + if (GA_EMPTY(gap)) ga_clear(gap); } } @@ -607,7 +607,7 @@ void ex_breaklist(exarg_T *eap) struct debuggy *bp; int i; - if (dbg_breakp.ga_len == 0) + if (GA_EMPTY(&dbg_breakp)) MSG(_("No breakpoints defined")); else for (i = 0; i < dbg_breakp.ga_len; ++i) { @@ -670,7 +670,7 @@ debuggy_find ( int prev_got_int; /* Return quickly when there are no breakpoints. */ - if (gap->ga_len == 0) + if (GA_EMPTY(gap)) return (linenr_T)0; /* Replace K_SNR in function name with "<SNR>". */ |