diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-07 21:32:11 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-17 07:02:44 -0300 |
commit | b4efff652388260b548324f870201a5804e097f0 (patch) | |
tree | b7afb575a4640ef28e06b6a6519839420996a492 /src/nvim/regexp.c | |
parent | 659cd0e99a0993497279ef8538956eec9f2fc374 (diff) | |
download | rneovim-b4efff652388260b548324f870201a5804e097f0.tar.gz rneovim-b4efff652388260b548324f870201a5804e097f0.tar.bz2 rneovim-b4efff652388260b548324f870201a5804e097f0.zip |
Replace ga->ga_len > 0 checks with !GA_EMPTY(ga)
Used Coccinelle to perform the changes
```diff
@@
expression E;
@@
<...
(
- E.ga_len > 0
+ !GA_EMPTY(&E)
|
- E->ga_len > 0
+ !GA_EMPTY(E)
)
...>
```
`spatch --in-place --sp-file ga_empty.cocci <C_FILE>`
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index b724439401..8241770bd3 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -4697,7 +4697,7 @@ regmatch ( * If there is something on the regstack execute the code for the state. * If the state is popped then loop and use the older state. */ - while (regstack.ga_len > 0 && status != RA_FAIL) { + while (!GA_EMPTY(®stack) && status != RA_FAIL) { rp = (regitem_T *)((char *)regstack.ga_data + regstack.ga_len) - 1; switch (rp->rs_state) { case RS_NOPEN: |