aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-01-28 22:54:03 +0100
committerDundar Göc <gocdundar@gmail.com>2022-01-30 19:16:51 +0100
commit2793fcae0ac2aef14c8f22636d579c68a97c0851 (patch)
tree5cddb34fa2afee8587a11aa5b431b7859b451536 /src/nvim/api/private/helpers.c
parent46bd48f7e902250dbccdea71ec6eb3888588133f (diff)
downloadrneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.tar.gz
rneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.tar.bz2
rneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.zip
vim-patch:8.2.4241: some type casts are redundant
Problem: Some type casts are redundant. Solution: Remove the type casts. (closes vim/vim#9643) https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 This is not a literal port but an equivalent one.
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index f540f8f7ee..4ddd90f3c9 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -139,10 +139,10 @@ bool try_end(Error *err)
got_int = false;
} else if (msg_list != NULL && *msg_list != NULL) {
int should_free;
- char *msg = (char *)get_exception_string(*msg_list,
- ET_ERROR,
- NULL,
- &should_free);
+ char *msg = get_exception_string(*msg_list,
+ ET_ERROR,
+ NULL,
+ &should_free);
api_set_error(err, kErrorTypeException, "%s", msg);
free_global_msglist();
@@ -720,7 +720,6 @@ fail_and_free:
xfree(parsed_args.rhs);
xfree(parsed_args.orig_rhs);
XFREE_CLEAR(parsed_args.desc);
- return;
}
/// Collects `n` buffer lines into array `l`, optionally replacing newlines