refactor: remove redundant const char * casts

(cherry picked from commit 1afb4a2963)
This commit is contained in:
ii14
2023-04-07 16:27:17 +02:00
committed by github-actions[bot]
parent 060fa561f7
commit 2399f4a539
56 changed files with 302 additions and 350 deletions

View File

@@ -268,7 +268,7 @@ int open_buffer(int read_stdin, exarg_T *eap, int flags_arg)
int save_bin = curbuf->b_p_bin;
int perm;
perm = os_getperm((const char *)curbuf->b_ffname);
perm = os_getperm(curbuf->b_ffname);
if (perm >= 0 && (0 || S_ISFIFO(perm)
|| S_ISSOCK(perm)
# ifdef OPEN_CHR_FILES
@@ -3309,8 +3309,7 @@ void maketitle(void)
SPACE_FOR_FNAME + 1);
buf_p += MIN(size, SPACE_FOR_FNAME);
} else {
buf_p += transstr_buf((const char *)path_tail(curbuf->b_fname),
-1, buf_p, SPACE_FOR_FNAME + 1, true);
buf_p += transstr_buf(path_tail(curbuf->b_fname), -1, buf_p, SPACE_FOR_FNAME + 1, true);
}
switch (bufIsChanged(curbuf)
@@ -3557,7 +3556,7 @@ void fname_expand(buf_T *buf, char **ffname, char **sfname)
#ifdef MSWIN
if (!buf->b_p_bin) {
// If the file name is a shortcut file, use the file it links to.
char *rfname = os_resolve_shortcut((const char *)(*ffname));
char *rfname = os_resolve_shortcut(*ffname);
if (rfname != NULL) {
xfree(*ffname);
*ffname = rfname;