diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
commit | d199d18159c624844c9c8052d1a98b91084fb803 (patch) | |
tree | 827dd9c4f8f1f6ef73ff1f20a609d08e36640986 /src/nvim/ops.c | |
parent | 8bbeb4b480a72d0099a18c4d8200313600045231 (diff) | |
parent | e85598e5a91c714c10034b6b3986a666065d1078 (diff) | |
download | rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.gz rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.bz2 rneovim-d199d18159c624844c9c8052d1a98b91084fb803.zip |
Merge #787 'removal of redundant OOM error handling'
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 4f1cd5d526..e80ffac6e1 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -943,14 +943,12 @@ do_execreg ( (char_u *) "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", Ctrl_V, FALSE); - if (p != NULL) { - /* When in Visual mode "'<,'>" will be prepended to the command. - * Remove it when it's already there. */ - if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) - retval = put_in_typebuf(p + 5, TRUE, TRUE, silent); - else - retval = put_in_typebuf(p, TRUE, TRUE, silent); - } + /* When in Visual mode "'<,'>" will be prepended to the command. + * Remove it when it's already there. */ + if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) + retval = put_in_typebuf(p + 5, TRUE, TRUE, silent); + else + retval = put_in_typebuf(p, TRUE, TRUE, silent); free(p); } else if (regname == '=') { p = get_expr_line(); @@ -988,8 +986,6 @@ do_execreg ( return FAIL; } escaped = vim_strsave_escape_csi(y_current->y_array[i]); - if (escaped == NULL) - return FAIL; retval = ins_typebuf(escaped, remap, 0, TRUE, silent); free(escaped); if (retval == FAIL) |