summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <habets@google.com>2019-11-01 14:30:55 +0000
committerThomas Habets <habets@google.com>2019-11-01 14:30:55 +0000
commit6fd7cee787624426cc0bc1f6e4a9175c01640115 (patch)
tree249e3d51955c4936a6c05f90da50aca866c9986a
parent9d12798cdf830a04b663e1db0889c8765ef86052 (diff)
downloadarping-6fd7cee787624426cc0bc1f6e4a9175c01640115.tar.gz
Clarify logic of 'is parm given', hopefully satisfying coverity
-rw-r--r--src/arping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arping.c b/src/arping.c
index 917efec..b6e07b4 100644
--- a/src/arping.c
+++ b/src/arping.c
@@ -1866,7 +1866,7 @@ arping_main(int argc, char **argv)
* Handle dstip_given instead of ip address after parms (-B really)
*/
if (mode == NONE) {
- if (optind + 1 == argc) {
+ if (parm) {
mode = is_mac_addr(parm)?PINGMAC:PINGIP;
} else if (dstip_given) {
mode = PINGIP;