]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
use a mnemonic constant in rpl_daoack_print()
[tcpdump] / tcpdump.c
index 1db35daafd5837f6a26ada69e1d6d5d06d593da8..5598ec282f2dff91f000a78075325c85ba319022 100644 (file)
--- 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;