From 5209d2271b5e66ea3da0fc9056f99b8cafc14aa6 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Thu, 8 May 2014 15:03:25 -0300 Subject: 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) ) ...> --- src/nvim/undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/undo.c') diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 439cb9b2a5..4d499cc28e 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2419,7 +2419,7 @@ void ex_undolist(exarg_T *eap) } } - if (ga.ga_len == 0) + if (GA_EMPTY(&ga)) MSG(_("Nothing to undo")); else { sort_strings((char_u **)ga.ga_data, ga.ga_len); -- cgit