* java/lang/natObject.cc (sync_init): Use _Jv_AllocBytesChecked.

From-SVN: r26858
This commit is contained in:
Tom Tromey 1999-05-10 09:28:54 +00:00 committed by Tom Tromey
parent d5dde5342a
commit a619dc1e20
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,7 @@
1999-05-10 Tom Tromey <tromey@cygnus.com>
* java/lang/natObject.cc (sync_init): Use _Jv_AllocBytesChecked.
* java/awt/natToolkit.cc: Added copyright header.
* java/util/zip/InflaterInputStream.java: Added copyright header.

View File

@ -152,8 +152,7 @@ java::lang::Object::sync_init (void)
// been finalized. So if we just reinitialize the old one,
// we'll never be able to (re-)destroy the mutex and/or
// condition variable.
si = (_Jv_SyncInfo *) _Jv_AllocBytes (sizeof (_Jv_SyncInfo));
// FIXME: what if si == NULL?
si = (_Jv_SyncInfo *) _Jv_AllocBytesChecked (sizeof (_Jv_SyncInfo));
_Jv_MutexInit (&si->mutex);
_Jv_CondInit (&si->condition);
#if defined (_Jv_HaveCondDestroy) || defined (_Jv_HaveMutexDestroy)