aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-22 18:00:55 +0800
committerGitHub <noreply@github.com>2023-07-22 18:00:55 +0800
commitd2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26 (patch)
tree5ccd5999192f20426f31a196e4a9b239211c1e94 /src/nvim/ex_docmd.c
parent4b57ff77febbe6073bc4c5c3a45b0ad0d5d40e6c (diff)
downloadrneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.tar.gz
rneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.tar.bz2
rneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.zip
refactor: remove some (const char **) casts (#24423)
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index b3181e1b18..7aea2cda53 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2879,10 +2879,10 @@ bool checkforcmd(char **pp, const char *cmd, int len)
/// Append "cmd" to the error message in IObuff.
/// Takes care of limiting the length and handling 0xa0, which would be
/// invisible otherwise.
-static void append_command(char *cmd)
+static void append_command(const char *cmd)
{
size_t len = strlen(IObuff);
- char *s = cmd;
+ const char *s = cmd;
char *d;
if (len > IOSIZE - 100) {
@@ -2901,7 +2901,7 @@ static void append_command(char *cmd)
} else if (d - IObuff + utfc_ptr2len(s) + 1 >= IOSIZE) {
break;
} else {
- mb_copy_char((const char **)&s, &d);
+ mb_copy_char(&s, &d);
}
}
*d = NUL;