diff options
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 10 |
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". |