X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/0e34f5d742dbced0374217501ed9db1a79034b35..4fe8841dce9ba05e8b36aa97b02190ac81ccafd5:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index 1db35daa..5598ec28 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -864,7 +864,7 @@ main(int argc, char **argv) case 'C': Cflag = atoi(optarg) * 1000000; - if (Cflag < 0) + if (Cflag <= 0) error("invalid file size %s", optarg); break; @@ -1115,8 +1115,8 @@ main(int argc, char **argv) ndo->ndo_packettype = PT_PGM_ZMTP1; else if (ascii_strcasecmp(optarg, "lmp") == 0) ndo->ndo_packettype = PT_LMP; - else if (strcasecmp(optarg, "resp") == 0) - ndo->ndo_packettype = PT_RESP; + else if (ascii_strcasecmp(optarg, "resp") == 0) + ndo->ndo_packettype = PT_RESP; else error("unknown packet type `%s'", optarg); break; @@ -1145,7 +1145,7 @@ main(int argc, char **argv) case 'W': Wflag = atoi(optarg); - if (Wflag < 0) + if (Wflag <= 0) error("invalid number of output files %s", optarg); WflagChars = getWflagChars(Wflag); break;