mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
refactor(ex_session.c): remove unnecessary char -> int -> char cast
The two calls to get_view_file() both pass a char in a string, and get_view_file() assigns it to a char in a string.
This commit is contained in:
@@ -1080,7 +1080,7 @@ void ex_mkrc(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @return the name of the view file for the current buffer.
|
/// @return the name of the view file for the current buffer.
|
||||||
static char *get_view_file(int c)
|
static char *get_view_file(char c)
|
||||||
{
|
{
|
||||||
if (curbuf->b_ffname == NULL) {
|
if (curbuf->b_ffname == NULL) {
|
||||||
emsg(_(e_noname));
|
emsg(_(e_noname));
|
||||||
@@ -1119,8 +1119,7 @@ static char *get_view_file(int c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*s++ = '=';
|
*s++ = '=';
|
||||||
assert(c >= CHAR_MIN && c <= CHAR_MAX);
|
*s++ = c;
|
||||||
*s++ = (char)c;
|
|
||||||
xstrlcpy(s, ".vim", 5);
|
xstrlcpy(s, ".vim", 5);
|
||||||
|
|
||||||
xfree(sname);
|
xfree(sname);
|
||||||
|
Reference in New Issue
Block a user