vim-patch:8.2.3460: some type casts are not needed #15868

Problem:    Some type casts are not needed.
Solution:   Remove unnecessary type casts. (closes vim/vim#8934)
dfa5e464d4
This commit is contained in:
dundargoc
2021-10-03 03:04:21 +02:00
committed by GitHub
parent 4449297d12
commit ad1c42a97d
9 changed files with 21 additions and 25 deletions

View File

@@ -1089,8 +1089,7 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose, int us
size_t matched = 0;
// read output
cs_fill_results((char *)pat, totmatches, nummatches, &matches,
&contexts, &matched);
cs_fill_results(pat, totmatches, nummatches, &matches, &contexts, &matched);
xfree(nummatches);
if (matches == NULL) {
return FALSE;
@@ -1475,13 +1474,14 @@ retry:
*
* <filename> <context> <line number> <pattern>
*/
if ((name = strtok((char *)buf, (const char *)" ")) == NULL) {
char *saveptr = NULL;
if ((name = os_strtok(buf, (const char *)" ", &saveptr)) == NULL) {
return NULL;
}
if ((*context = strtok(NULL, (const char *)" ")) == NULL) {
if ((*context = os_strtok(NULL, (const char *)" ", &saveptr)) == NULL) {
return NULL;
}
if ((*linenumber = strtok(NULL, (const char *)" ")) == NULL) {
if ((*linenumber = os_strtok(NULL, (const char *)" ", &saveptr)) == NULL) {
return NULL;
}
*search = *linenumber + strlen(*linenumber) + 1; // +1 to skip \0