if (!A) C else B -> if (A) B else C
These are some commonly read lines. Reorganizing
for sanity while working on 67500459.
Test: pass
Change-Id: Id176a69e12abd05850997b6022efa3fbd8ac73a6
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 3327477..3f0ebc6 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -298,10 +298,10 @@
for (const std::string &lib : libs) {
const std::string fullPath = path + lib;
- if (path != HAL_LIBRARY_PATH_SYSTEM) {
- handle = android_load_sphal_library(fullPath.c_str(), dlMode);
- } else {
+ if (path == HAL_LIBRARY_PATH_SYSTEM) {
handle = dlopen(fullPath.c_str(), dlMode);
+ } else {
+ handle = android_load_sphal_library(fullPath.c_str(), dlMode);
}
if (handle == nullptr) {