]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(close_output_file): Set output_stream to NULL so we don't recurse
authorJim Meyering <jim@meyering.net>
Sun, 5 Nov 1995 05:51:53 +0000 (05:51 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 5 Nov 1995 05:51:53 +0000 (05:51 +0000)
endlessly between this function and cleanup.

src/csplit.c

index a81144a6682ba58b1475710f465094ac0f2a094c..f40a102b2d91cd27291e0e0d0ac7fccb957c2a7e 100644 (file)
@@ -1037,6 +1037,7 @@ close_output_file ()
       if (fclose (output_stream) == EOF)
        {
          error (0, errno, _("write error for `%s'"), output_filename);
+         output_stream = NULL;
          cleanup ();
        }
       if (bytes_written == 0 && elide_empty_files)