aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 10:36:35 +0200
committerDundar Göc <gocdundar@gmail.com>2022-08-26 22:24:28 +0200
commit395277036014189c03b8969fc0a5cd2bdc5c8631 (patch)
tree27caaef2e0b8351eb5637d1a969229663ec2c4a8 /src/nvim/autocmd.c
parent6a13b8fa5460da5aa22a1c366e5252c26ed5fe1e (diff)
downloadrneovim-395277036014189c03b8969fc0a5cd2bdc5c8631.tar.gz
rneovim-395277036014189c03b8969fc0a5cd2bdc5c8631.tar.bz2
rneovim-395277036014189c03b8969fc0a5cd2bdc5c8631.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r--src/nvim/autocmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index e970387456..2fe9df2206 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -686,7 +686,7 @@ const char *event_nr2name(event_T event)
static bool event_ignored(event_T event)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
- char *p = (char *)p_ei;
+ char *p = p_ei;
while (*p != NUL) {
if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ',')) {
@@ -703,7 +703,7 @@ static bool event_ignored(event_T event)
// Return OK when the contents of p_ei is valid, FAIL otherwise.
int check_ei(void)
{
- char *p = (char *)p_ei;
+ char *p = p_ei;
while (*p) {
if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ',')) {
@@ -724,8 +724,8 @@ int check_ei(void)
// Returns the old value of 'eventignore' in allocated memory.
char *au_event_disable(char *what)
{
- char *save_ei = (char *)vim_strsave(p_ei);
- char *new_ei = (char *)vim_strnsave(p_ei, STRLEN(p_ei) + STRLEN(what));
+ char *save_ei = xstrdup(p_ei);
+ char *new_ei = xstrnsave(p_ei, STRLEN(p_ei) + STRLEN(what));
if (*what == ',' && *p_ei == NUL) {
STRCPY(new_ei, what + 1);
} else {