From: Florian Forster Date: Wed, 15 Jul 2009 11:09:48 +0000 (+0200) Subject: src/oping.c: Only treat "-" as STDIN, not all strings beginning with "-". X-Git-Tag: liboping-1.2.0~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cffebf48f20acd4bf8142531575833d42d1760d5;p=liboping.git src/oping.c: Only treat "-" as STDIN, not all strings beginning with "-". --- diff --git a/src/oping.c b/src/oping.c index 3164230..4f75f22 100644 --- a/src/oping.c +++ b/src/oping.c @@ -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");