Skip to content

Commit

Permalink
Fix compilation errors in libmedia, libstagefright.
Browse files Browse the repository at this point in the history
(invalid conversion from 'const char*' to 'char*')

Change-Id: Idef85606b7cff629b2778ed8134c79c892af54c2
  • Loading branch information
Rene Bolldorf authored and rmcc committed Sep 27, 2010
1 parent a1ca5df commit 032ddfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions media/libmedia/MediaScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ status_t MediaScanner::processDirectory(
}

static bool fileMatchesExtension(const char* path, const char* extensions) {
char* extension = strrchr(path, '.');
const char* extension = strrchr(path, '.');
if (!extension) return false;
++extension; // skip the dot
if (extension[0] == 0) return false;

while (extensions[0]) {
char* comma = strchr(extensions, ',');
const char* comma = strchr(extensions, ',');
size_t length = (comma ? comma - extensions : strlen(extensions));
if (length == strlen(extension) && strncasecmp(extension, extensions, length) == 0) return true;
extensions += length;
Expand Down
4 changes: 2 additions & 2 deletions media/libstagefright/HTTPDataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ HTTPDataSource::HTTPDataSource(
string path;
int port;

char *slash = strchr(uri + 7, '/');
const char *slash = strchr(uri + 7, '/');
if (slash == NULL) {
host = uri + 7;
path = "/";
Expand All @@ -167,7 +167,7 @@ HTTPDataSource::HTTPDataSource(
path = slash;
}

char *colon = strchr(host.c_str(), ':');
const char *colon = strchr(host.c_str(), ':');
if (colon == NULL) {
port = 80;
} else {
Expand Down

0 comments on commit 032ddfd

Please sign in to comment.