]> granicus.if.org Git - flex/commitdiff
correct improper stdin assignment flex-2-5-32
authorWill Estes <wlestes@users.sourceforge.net>
Tue, 20 Jul 2004 20:32:02 +0000 (20:32 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Tue, 20 Jul 2004 20:32:02 +0000 (20:32 +0000)
filter.c

index b925c57a2d530e52e5eb955b8d92424ce319f092..b2cf320c982def15905db136845508fb9b286175 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -163,9 +163,9 @@ bool filter_apply_chain (struct filter * chain)
                        int     r;
 
                        /* setup streams again */
-                       if ((stdin = fdopen (0, "r")) == NULL)
+                       if ( ! fdopen (0, "r"))
                                flexfatal (_("fdopen(0) failed"));
-                       if ((stdout = fdopen (1, "w")) == NULL)
+                       if (!fdopen (1, "w"))
                                flexfatal (_("fdopen(1) failed"));
 
                        if ((r = chain->filter_func (chain)) == -1)
@@ -186,7 +186,7 @@ bool filter_apply_chain (struct filter * chain)
        if (dup2 (pipes[1], 1) == -1)
                flexfatal (_("dup2(pipes[1],1)"));
        close (pipes[1]);
-       if ((stdout = fdopen (1, "w")) == NULL)
+       if ( !fdopen (1, "w"))
                flexfatal (_("fdopen(1) failed"));
 
        return true;