Merge "Fix a use-of-uninitialized-value warning" am: 53873df5fe am: aea873ade0

am: 820768f034

Change-Id: Id9b31425cb8ba05687ff7dfa392b230865ec18e5
This commit is contained in:
George Burgess IV
2017-02-01 07:27:15 +00:00
committed by android-build-merger

View File

@@ -132,6 +132,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o
pointer = _env->CallStaticLongMethod(nioAccessClass, pointer = _env->CallStaticLongMethod(nioAccessClass,
getBasePointerID, buffer); getBasePointerID, buffer);
if (pointer != 0L) { if (pointer != 0L) {
*offset = 0;
*array = NULL; *array = NULL;
return reinterpret_cast<void *>(pointer); return reinterpret_cast<void *>(pointer);
} }
@@ -139,6 +140,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer); getBaseArrayID, buffer);
if (*array == NULL) { if (*array == NULL) {
*offset = 0;
return (void*) NULL; return (void*) NULL;
} }
*offset = _env->CallStaticIntMethod(nioAccessClass, *offset = _env->CallStaticIntMethod(nioAccessClass,