use const for strtok tokens

This commit is contained in:
Daniel Micay 2012-09-21 18:24:19 -04:00
parent 4559891f1d
commit d4490bc785
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ static void find_urls(VteTerminal *vte, search_panel_info *panel_info) {
char *content = vte_terminal_get_text(vte, NULL, NULL, attributes);
for (char *s_ptr = content, *saveptr; ; s_ptr = nullptr) {
char *token = strtok_r(s_ptr, "\n", &saveptr);
const char *token = strtok_r(s_ptr, "\n", &saveptr);
if (!token) {
break;
}
@ -669,7 +669,7 @@ GtkTreeModel *create_completion_model(VteTerminal *vte) {
std::set<const char *, decltype(less)> tokens(less);
for (char *s_ptr = content, *saveptr; ; s_ptr = nullptr) {
char *token = strtok_r(s_ptr, " \n\t", &saveptr);
const char *token = strtok_r(s_ptr, " \n\t", &saveptr);
if (!token) {
break;
}