Mercurial > vim
comparison src/ex_getln.c @ 31600:f1d5ad2b978e v9.0.1132
patch 9.0.1132: code is indented more than needed
Commit: https://github.com/vim/vim/commit/dc4daa3a3915fba11ac87d27977240d9a5e0d47d
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Jan 2 16:54:53 2023 +0000
patch 9.0.1132: code is indented more than needed
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan,
closes #11769)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 02 Jan 2023 18:00:04 +0100 |
parents | 7d40c8c10a12 |
children | b89cfd86e18e |
comparison
equal
deleted
inserted
replaced
31599:7eb3096f4493 | 31600:f1d5ad2b978e |
---|---|
4208 void | 4208 void |
4209 f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv) | 4209 f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv) |
4210 { | 4210 { |
4211 rettv->v_type = VAR_STRING; | 4211 rettv->v_type = VAR_STRING; |
4212 rettv->vval.v_string = alloc(2); | 4212 rettv->vval.v_string = alloc(2); |
4213 if (rettv->vval.v_string != NULL) | 4213 if (rettv->vval.v_string == NULL) |
4214 { | 4214 return; |
4215 rettv->vval.v_string[0] = get_cmdline_type(); | 4215 |
4216 rettv->vval.v_string[1] = NUL; | 4216 rettv->vval.v_string[0] = get_cmdline_type(); |
4217 } | 4217 rettv->vval.v_string[1] = NUL; |
4218 } | 4218 } |
4219 | 4219 |
4220 // Set the command line str to "str". | 4220 // Set the command line str to "str". |
4221 // Returns 1 when failed, 0 when OK. | 4221 // Returns 1 when failed, 0 when OK. |
4222 static int | 4222 static int |