Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9fdc2cd authored by Colin Cross's avatar Colin Cross
Browse files

Return 0 instead of NULL for jlong

musl libc defines NULL as nullptr, which is explicitly allowed by
C++11.  nullptr_t cannot be implicitly cast to an integral type.
Return 0 instead.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id83c1994a95cb105785c8ad902d2fe0589cb188d
parent bc8f2567
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public:
        size_t chunkSize = env->GetArrayLength(obj);
        if (chunkSize < (int) (sizeof(Res_png_9patch))) {
            jniThrowRuntimeException(env, "Array too small for chunk.");
            return NULL;
            return 0;
        }

        int8_t* storage = new int8_t[chunkSize];
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static jlong createPathDataFromStringPath(JNIEnv* env, jobject, jstring inputStr
    } else {
        delete pathData;
        doThrowIAE(env, result.failureMessage.c_str());
        return NULL;
        return 0;
    }
}