Patch: bug fix in iconv finalizer
Tom Tromey
tromey@cygnus.com
Wed Feb 9 16:13:00 GMT 2000
I'm committing the appended patch. It fixes a stupid bug pointed out
to me by Andrew.
2000-02-09 Tom Tromey <tromey@cygnus.com>
* gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
iconv_close when handle is not NULL. Thanks to Andrew Haley.
(Output_iconv::finalize): Likewise.
Tom
Index: gnu/gcj/convert/natIconv.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/gnu/gcj/convert/natIconv.cc,v
retrieving revision 1.2
diff -u -r1.2 natIconv.cc
--- natIconv.cc 2000/01/31 08:56:09 1.2
+++ natIconv.cc 2000/02/10 00:12:39
@@ -47,7 +47,7 @@
gnu::gcj::convert::Input_iconv::finalize (void)
{
#ifdef HAVE_ICONV
- if (handle == NULL)
+ if (handle != NULL)
{
iconv_close ((iconv_t) handle);
handle = NULL;
@@ -108,7 +108,7 @@
gnu::gcj::convert::Output_iconv::finalize (void)
{
#ifdef HAVE_ICONV
- if (handle == NULL)
+ if (handle != NULL)
{
iconv_close ((iconv_t) handle);
handle = NULL;
More information about the Java-patches
mailing list