aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-10-03 03:04:21 +0200
committerGitHub <noreply@github.com>2021-10-02 18:04:21 -0700
commitad1c42a97d673b9fd2bf64b2382c87fbe65dfc73 (patch)
tree1dc5d77ed6ba987d0c6af8e492038ad7873e62b4 /src/nvim/if_cscope.c
parent4449297d12b70f5e6a65365e39aacf5e42303ffd (diff)
downloadrneovim-ad1c42a97d673b9fd2bf64b2382c87fbe65dfc73.tar.gz
rneovim-ad1c42a97d673b9fd2bf64b2382c87fbe65dfc73.tar.bz2
rneovim-ad1c42a97d673b9fd2bf64b2382c87fbe65dfc73.zip
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) https://github.com/vim/vim/commit/dfa5e464d459f84200a73d178f1ecefe75bbe511
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 0bccaf1a35..76dcb58236 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -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