]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
authorJim Meyering <jim@meyering.net>
Sat, 20 May 1995 11:47:31 +0000 (11:47 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 20 May 1995 11:47:31 +0000 (11:47 +0000)
Instead, declare two FILE structs and use their addresses.

src/paste.c

index 69b2815f14d39a369deb62c4e47068d845cea118..cc7442cafbba3616781789d59040611122eb3c0a 100644 (file)
@@ -58,11 +58,13 @@ static void usage ();
 /* Indicates that no delimiter should be added in the current position. */
 #define EMPTY_DELIM '\0'
 
+static FILE dummy_closed;
 /* Element marking a file that has reached EOF and been closed. */
-#define        CLOSED ((FILE *) -1)
+#define        CLOSED (&dummy_closed)
 
+static FILE dummy_endlist;
 /* Element marking end of list of open files. */
-#define ENDLIST ((FILE *) -2)
+#define ENDLIST (&dummy_endlist)
 
 /* Name this program was run with. */
 char *program_name;