summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-25 11:31:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-25 11:31:05 (GMT)
commit2cede8bf26cdf7b2becd4a49755290e3fa4a1e5a (patch)
treec19f667e7134acd502fc328c114101a002e86347 /compat
parenta4d1a762c2132e20f6746d755693c288c336d313 (diff)
parent33781b4f56a17a08c2a610101656daed7b75a346 (diff)
downloadtcl-2cede8bf26cdf7b2becd4a49755290e3fa4a1e5a.zip
tcl-2cede8bf26cdf7b2becd4a49755290e3fa4a1e5a.tar.gz
tcl-2cede8bf26cdf7b2becd4a49755290e3fa4a1e5a.tar.bz2
Merge 8.7
Diffstat (limited to 'compat')
-rw-r--r--compat/strstr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/strstr.c b/compat/strstr.c
index 206dca9..35386d0 100644
--- a/compat/strstr.c
+++ b/compat/strstr.c
@@ -36,10 +36,10 @@
char *
strstr(
- char *string, /* String to search. */
- char *substring) /* Substring to try to find in string. */
+ const char *string, /* String to search. */
+ const char *substring) /* Substring to try to find in string. */
{
- char *a, *b;
+ const char *a, *b;
/*
* First scan quickly through the two strings looking for a
@@ -49,7 +49,7 @@ strstr(
b = substring;
if (*b == 0) {
- return string;
+ return (char *)string;
}
for ( ; *string != 0; string += 1) {
if (*string != *b) {
@@ -58,7 +58,7 @@ strstr(
a = string;
while (1) {
if (*b == 0) {
- return string;
+ return (char *)string;
}
if (*a++ != *b++) {
break;