Remove invalid logging on missing root.expand() functions.
Bug: 8566872
This log message is confusing and unncessary. Due to legacy compatibility,
slot 0 is always reserved for root.expand(). We know that root.expand() may
not exist for many user scripts, since we have supported proper names for
kernels for several releases now.
Change-Id: Id869496aa83f98ce64d6bd784314d788e25182e0
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index ff1fd14..77ea75c 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -359,14 +359,12 @@
mForEachSignatures[i] = tmpSig;
mForEachFunctions[i] =
(ForEachFunc_t) dlsym(mScriptSO, tmpName);
- if (mForEachFunctions[i] == NULL) {
- ALOGE("Failed to find forEach function address for %s: %s",
- tmpName, dlerror());
+ if (i != 0 && mForEachFunctions[i] == NULL) {
// Ignore missing root.expand functions.
// root() is always specified at location 0.
- if (i != 0) {
- goto error;
- }
+ ALOGE("Failed to find forEach function address for %s: %s",
+ tmpName, dlerror());
+ goto error;
}
else {
//ALOGE("Found forEach %s at %p", tmpName, mForEachFunctions[i]);