diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-03-14 21:59:54 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-03-14 21:59:54 +0000 |
commit | 90a883ae6be11e9916f0907bac3ad1426d6e9c6d (patch) | |
tree | 5399dfe780e1b84710226e8d752f11946e0f1302 /libjava/jni.cc | |
parent | 0edd203b8dcf9b32999e9c61603ae406158e260a (diff) | |
download | gcc-90a883ae6be11e9916f0907bac3ad1426d6e9c6d.tar.gz |
jni.cc (mangled_name): Fixed assertion.
* jni.cc (mangled_name): Fixed assertion.
(JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
turned assert into actual failure.
From-SVN: r32546
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r-- | libjava/jni.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc index 1d9aae4df49..6cf489f3d9a 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -1606,7 +1606,7 @@ mangled_name (jclass klass, _Jv_Utf8Const *func_name, const unsigned char *sig = (const unsigned char *) signature->data; limit = sig + signature->length; - JvAssert (signature[0] == '('); + JvAssert (sig[0] == '('); ++sig; while (1) { @@ -1958,9 +1958,11 @@ JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args) } jint -JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize /* buf_len */, jsize *n_vms) +JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms) { - JvAssert (buf_len > 0); + if (buf_len <= 0) + return JNI_ERR; + // We only support a single VM. if (the_vm != NULL) { |