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
This commit is contained in:
dundargoc
2022-12-21 12:00:05 +01:00
committed by GitHub
parent c24605a5a0
commit ec1738a6ed
26 changed files with 533 additions and 533 deletions

View File

@@ -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.