aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-12-21 12:00:05 +0100
committerGitHub <noreply@github.com>2022-12-21 19:00:05 +0800
commitec1738a6ed08dd3a89fd07950fa2dcc55a72b705 (patch)
tree2df3877a3d10926a2fcb17b4e2ff07fd70d03ceb /src/nvim/ex_cmds.c
parentc24605a5a08873d0c7161941b0c7d0aba63d1ccc (diff)
downloadrneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.gz
rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.bz2
rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.zip
refactor: replace char_u with char 16 - remove STRNCMP (#21208)
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index e6e6176669..5eb5359e90 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1367,12 +1367,13 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp)
{
bool is_fish_shell =
#if defined(UNIX)
- STRNCMP(invocation_path_tail((char_u *)p_sh, NULL), "fish", 4) == 0;
+ strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "fish", 4) == 0;
#else
false;
#endif
- bool is_pwsh = STRNCMP(invocation_path_tail((char_u *)p_sh, NULL), "pwsh", 4) == 0
- || STRNCMP(invocation_path_tail((char_u *)p_sh, NULL), "powershell", 10) == 0;
+ bool is_pwsh = strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "pwsh", 4) == 0
+ || strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "powershell",
+ 10) == 0;
size_t len = strlen(cmd) + 1; // At least enough space for cmd + NULL.