From 63b48311b0167179404f7b1a005218bb46359fcc Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Wed, 26 Mar 2014 20:47:14 +0900 Subject: [PATCH] RegisterNatives() returns 0 on success. cf. http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/functions.html#wp5833 Change-Id: I2c599f2d8765a7475c7076e6b049f77ad79feb79 --- native/jni/jni_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/jni_common.cpp b/native/jni/jni_common.cpp index 9fa7ef8f9..ce5e30c5d 100644 --- a/native/jni/jni_common.cpp +++ b/native/jni/jni_common.cpp @@ -67,7 +67,7 @@ int registerNativeMethods(JNIEnv *env, const char *const className, const JNINat AKLOGE("Native registration unable to find class '%s'", className); return JNI_FALSE; } - if (env->RegisterNatives(clazz, methods, numMethods) < 0) { + if (env->RegisterNatives(clazz, methods, numMethods) != 0) { AKLOGE("RegisterNatives failed for '%s'", className); env->DeleteLocalRef(clazz); return JNI_FALSE;