libbpf_android/Loader - fixes performance-faster-string-find warning
Fixes:
system/bpf/libbpf_android/Loader.cpp:557:49: warning: 'find_last_of' called with a string literal consisting of a single character; consider using the more effective overload accepting a character [performance-faster-string-find]
name = name.substr(0, name.find_last_of("$"));
^~~
'$'
Test: builds
Bug: 153035880
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iea62a59380c155796a7fa2ac4ca3352f9236ba98
This commit is contained in:
parent
681f604b2e
commit
428843de55
1 changed files with 1 additions and 1 deletions
|
|
@ -554,7 +554,7 @@ static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const
|
|||
// strip any potential $foo suffix
|
||||
// this can be used to provide duplicate programs
|
||||
// conditionally loaded based on running kernel version
|
||||
name = name.substr(0, name.find_last_of("$"));
|
||||
name = name.substr(0, name.find_last_of('$'));
|
||||
|
||||
bool reuse = false;
|
||||
// Format of pin location is
|
||||
|
|
|
|||
Loading…
Reference in a new issue