fixed usage of char* when const char* is expected, reported by ziomatto

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2009-05-30 11:10:23 +00:00
parent 97566384f7
commit 0aab2caf8e
2 changed files with 4 additions and 4 deletions

View File

@ -2118,7 +2118,7 @@ BString::_DoPrepend(const char *str, int32 count)
int32
BString::_FindAfter(const char *str, int32 offset, int32 strlen) const
{
char *ptr = strstr(String() + offset, str);
const char *ptr = strstr(String() + offset, str);
if (ptr != NULL)
return ptr - String();
@ -2130,7 +2130,7 @@ BString::_FindAfter(const char *str, int32 offset, int32 strlen) const
int32
BString::_IFindAfter(const char *str, int32 offset, int32 strlen) const
{
char *ptr = strcasestr(String() + offset, str);
const char *ptr = strcasestr(String() + offset, str);
if (ptr != NULL)
return ptr - String();
@ -2142,7 +2142,7 @@ BString::_IFindAfter(const char *str, int32 offset, int32 strlen) const
int32
BString::_ShortFindAfter(const char *str, int32 len) const
{
char *ptr = strstr(String(), str);
const char *ptr = strstr(String(), str);
if (ptr != NULL)
return ptr - String();

View File

@ -163,7 +163,7 @@ normalize_entry_path(const char *path, string &normalizedPath)
const char *leafName = NULL;
string dirPathString;
if (char *lastSlash = strrchr(path, '/')) {
if (const char *lastSlash = strrchr(path, '/')) {
// found a slash: decompose into dir path and leaf name
leafName = lastSlash + 1;
if (leafName[0] == '\0') {