From 7a518360023592882a7335b843ce1a5ea322dec5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 25 Jan 2010 07:17:47 -0800 Subject: Fix error checking in iconv. --- iconv/iconv_prog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iconv') diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index a1ca05f153..3bcb9b464e 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -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 -- cgit v1.2.3