This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: bug fix in iconv finalizer


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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]