svn commit: r342142 - stable/12/sbin/ping

Eugene Grosbein eugen at FreeBSD.org
Sun Dec 16 01:17:28 UTC 2018


Author: eugen
Date: Sun Dec 16 01:17:27 2018
New Revision: 342142
URL: https://svnweb.freebsd.org/changeset/base/342142

Log:
  MFC r341768,r341795: ping(8): remove needless comparision with LONG_MAX
  after unsigned long ultmp changed to long ltmp in r340245.

Modified:
  stable/12/sbin/ping/ping.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/ping/ping.c
==============================================================================
--- stable/12/sbin/ping/ping.c	Sat Dec 15 23:20:08 2018	(r342141)
+++ stable/12/sbin/ping/ping.c	Sun Dec 16 01:17:27 2018	(r342142)
@@ -313,7 +313,7 @@ main(int argc, char *const *argv)
 			break;
 		case 'c':
 			ltmp = strtol(optarg, &ep, 0);
-			if (*ep || ep == optarg || ltmp > LONG_MAX || ltmp <=0)
+			if (*ep || ep == optarg || ltmp <= 0)
 				errx(EX_USAGE,
 				    "invalid count of packets to transmit: `%s'",
 				    optarg);


More information about the svn-src-stable mailing list