summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2014-09-18 21:17:29 +0200
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2014-09-18 21:17:29 +0200
commitf129e84addb1b0ba1240f39430404dad717c21c2 (patch)
tree4e808b54b2013515a45031f46f3d368275d4a140 /drm
parent14fc930d5d2ef272b39342fa083f4097464fc9ea (diff)
downloadframeworks_av-f129e84addb1b0ba1240f39430404dad717c21c2.zip
frameworks_av-f129e84addb1b0ba1240f39430404dad717c21c2.tar.gz
frameworks_av-f129e84addb1b0ba1240f39430404dad717c21c2.tar.bz2
Fix comparison of String8 to char* literal
Clang (correctly) interprets if ("." == sName) as if ("." == (const char*)sName) and recognizes that comparing the pointers isn't what was meant. With if (sName == ".") both clang and gcc see and use String8::operator==(const char *), ensuring we get the wanted behavior. Change-Id: Ide240e13214a56f6899f72de3db75dac647e6d4b Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'drm')
-rw-r--r--drm/libdrmframework/include/PlugInManager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drm/libdrmframework/include/PlugInManager.h b/drm/libdrmframework/include/PlugInManager.h
index c1d019a..a4c2bb9 100644
--- a/drm/libdrmframework/include/PlugInManager.h
+++ b/drm/libdrmframework/include/PlugInManager.h
@@ -238,7 +238,7 @@ private:
*/
bool isDotOrDDot(const struct dirent* pEntry) const {
String8 sName(pEntry->d_name);
- return "." == sName || ".." == sName;
+ return sName == "." || sName == "..";
}
/**