src/oping.c: Only treat "-" as STDIN, not all strings beginning with "-".
authorFlorian Forster <octo@verplant.org>
Wed, 15 Jul 2009 11:09:48 +0000 (13:09 +0200)
committerFlorian Forster <octo@verplant.org>
Wed, 15 Jul 2009 11:09:48 +0000 (13:09 +0200)
src/oping.c

index 3164230..4f75f22 100644 (file)
@@ -367,7 +367,8 @@ int main (int argc, char **argv)
                char line[256];
                char host[256];
 
-               if (strncmp(opt_filename, "-", 1) == 0)
+               if (strcmp (opt_filename, "-") == 0)
+                       /* Open STDIN */
                        infile = fdopen(0, "r");
                else
                        infile = fopen(opt_filename, "r");