summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-01-02 16:54:53 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-02 16:54:53 +0000
commitdc4daa3a3915fba11ac87d27977240d9a5e0d47d (patch)
tree7c28de30cdf3c6a351bd41795612be078f451c9f /src/ex_getln.c
parenta2942c74683be3f67c6044c2886dc6c237358b3d (diff)
patch 9.0.1132: code is indented more than neededv9.0.1132
Problem: Code is indented more than needed. Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan, closes #11769)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 4884ebd8a3..49331c4178 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4210,11 +4210,11 @@ f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->v_type = VAR_STRING;
rettv->vval.v_string = alloc(2);
- if (rettv->vval.v_string != NULL)
- {
- rettv->vval.v_string[0] = get_cmdline_type();
- rettv->vval.v_string[1] = NUL;
- }
+ if (rettv->vval.v_string == NULL)
+ return;
+
+ rettv->vval.v_string[0] = get_cmdline_type();
+ rettv->vval.v_string[1] = NUL;
}
// Set the command line str to "str".