Skip to content

Commit

Permalink
Fix error checking in iconv.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab authored and Ulrich Drepper committed Jan 25, 2010
1 parent 8549abc commit 7a51836
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion iconv/iconv_prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a51836

Please sign in to comment.