mirror of
https://github.com/neovim/neovim.git
synced 2025-11-24 19:20:39 +00:00
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>`
This commit is contained in:
committed by
Thiago de Arruda
parent
659cd0e99a
commit
b4efff6523
@@ -1094,7 +1094,7 @@ gen_expand_wildcards (
|
||||
free(t);
|
||||
}
|
||||
|
||||
if (did_expand_in_path && ga.ga_len > 0 && (flags & EW_PATH))
|
||||
if (did_expand_in_path && !GA_EMPTY(&ga) && (flags & EW_PATH))
|
||||
uniquefy_paths(&ga, p);
|
||||
if (p != pat[i])
|
||||
free(p);
|
||||
|
||||
Reference in New Issue
Block a user