Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#2522 strcasestr prototype error: Remove const from result type #2526

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ drmem_strndup(const char *src, size_t max, heapstat_t type);
#define MAX_OPTION_LEN DR_MAX_OPTIONS_LENGTH
xdje42 marked this conversation as resolved.
Show resolved Hide resolved

#if !defined(MACOS) && !defined(ANDROID) && !defined(NOLINK_STRCASESTR)
const char *
char *
strcasestr(const char *text, const char *pattern);
#endif

Expand Down
4 changes: 2 additions & 2 deletions common/utils_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ strnchr(const char *str, int find, size_t max)
* want a libc dependence.
*/
#if !defined(MACOS) && !defined(ANDROID) && !defined(NOLINK_STRCASESTR)
const char *
char *
strcasestr(const char *text, const char *pattern)
{
const char *cur_text, *cur_pattern, *root;
Expand All @@ -60,7 +60,7 @@ strcasestr(const char *text, const char *pattern)
cur_pattern = pattern;
while (true) {
if (*cur_pattern == '\0')
return root;
return (char *) root;
if (*cur_text == '\0')
return NULL;
/* XXX DRi#943: toupper is better, for int18n, and we need to call
Expand Down
Loading