EndsWith now accepts std::string suffixes.

Bug: N/A
Test: ran tests
Change-Id: I947a94f1ef950452fb3f90b31448d915a12eb2ac
This commit is contained in:
Elliott Hughes 2017-12-20 12:28:30 -08:00
parent 777d7c7914
commit 6db9af0392

View file

@ -44,7 +44,7 @@ static int dl_callback(struct dl_phdr_info *info, size_t /* size */, void *data)
return 0; return 0;
} }
if (android::base::EndsWith(info->dlpi_name, suffix.c_str())) { if (android::base::EndsWith(info->dlpi_name, suffix)) {
std::string* path = reinterpret_cast<std::string*>(data); std::string* path = reinterpret_cast<std::string*>(data);
*path = info->dlpi_name; *path = info->dlpi_name;
return 1; // found return 1; // found