]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix error checking in iconv.
authorAndreas Schwab <schwab@redhat.com>
Mon, 25 Jan 2010 15:17:47 +0000 (07:17 -0800)
committerPetr Baudis <pasky@ucw.cz>
Tue, 11 May 2010 23:40:00 +0000 (01:40 +0200)
(cherry picked from commit 7a518360023592882a7335b843ce1a5ea322dec5)

ChangeLog
iconv/iconv_prog.c

index cea6315b6ce51515e576113bd5314ea2cae96339..47f2e529d532478ea1aa00c1fdd62597262d6faf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-25  Andreas Schwab  <schwab@redhat.com>
+
+       * iconv/iconv_prog.c (write_output): Fix check for open failure.
+
 2010-01-22  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #11200]
index a1ca05f153caee4f463f122d9769687f811a5e2a..3bcb9b464e8d4fb96227a2f005bb330837a71831 100644 (file)
@@ -442,7 +442,7 @@ write_output (const char *outbuf, const char *outptr, FILE **output,
       if (output_file != NULL && strcmp (output_file, "-") != 0)
        {
          *output = fopen (output_file, "w");
-         if (output == NULL)
+         if (*output == NULL)
            error (EXIT_FAILURE, errno, _("cannot open output file"));
        }
       else