mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
refactor: remove redundant const char * casts
This commit is contained in:
@@ -1388,7 +1388,7 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp)
|
||||
if (is_pwsh) {
|
||||
if (itmp != NULL) {
|
||||
xstrlcpy(buf, "& { Get-Content ", len - 1); // FIXME: should we add "-Encoding utf8"?
|
||||
xstrlcat(buf, (const char *)itmp, len - 1);
|
||||
xstrlcat(buf, itmp, len - 1);
|
||||
xstrlcat(buf, " | & ", len - 1); // FIXME: add `&` ourself or leave to user?
|
||||
xstrlcat(buf, cmd, len - 1);
|
||||
xstrlcat(buf, " }", len - 1);
|
||||
@@ -1409,7 +1409,7 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp)
|
||||
|
||||
if (itmp != NULL) {
|
||||
xstrlcat(buf, " < ", len - 1);
|
||||
xstrlcat(buf, (const char *)itmp, len - 1);
|
||||
xstrlcat(buf, itmp, len - 1);
|
||||
}
|
||||
#else
|
||||
// For shells that don't understand braces around commands, at least allow
|
||||
@@ -1426,9 +1426,9 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp)
|
||||
}
|
||||
}
|
||||
xstrlcat(buf, " < ", len);
|
||||
xstrlcat(buf, (const char *)itmp, len);
|
||||
xstrlcat(buf, itmp, len);
|
||||
if (*p_shq == NUL) {
|
||||
const char *const p = find_pipe((const char *)cmd);
|
||||
const char *const p = find_pipe(cmd);
|
||||
if (p != NULL) {
|
||||
xstrlcat(buf, " ", len - 1); // Insert a space before the '|' for DOS
|
||||
xstrlcat(buf, p, len - 1);
|
||||
|
Reference in New Issue
Block a user