[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
minor xfopen code-duplication removal
From: |
Paul Eggert |
Subject: |
minor xfopen code-duplication removal |
Date: |
Thu, 14 Nov 2002 17:31:10 -0800 |
I installed this patch.
2002-11-14 Paul Eggert <address@hidden>
* src/output.c (output_skeleton): Call xfopen instead of
duplicating xfopen's body.
Index: output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -p -u -r1.210 -r1.211
--- output.c 12 Nov 2002 08:13:10 -0000 1.210
+++ output.c 15 Nov 2002 01:28:40 -0000 1.211
@@ -526,10 +526,7 @@ output_skeleton (void)
strcpy (full_path, pkgdatadir);
full_path[pkgdatadirlen] = '/';
strcpy (full_path + pkgdatadirlen + 1, m4sugar);
- in = fopen (full_path, "r");
- if (! in)
- error (EXIT_FAILURE, errno, "%s", full_path);
- xfclose (in);
+ xfclose (xfopen (full_path, "r"));
strcpy (full_path + pkgdatadirlen + 1, skeleton);
/* Create an m4 subprocess connected to us via two pipes. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- minor xfopen code-duplication removal,
Paul Eggert <=