[PATCH] primes(6) -- remove unnecessary code

Steve Kargl sgk at troutmask.apl.washington.edu
Fri Dec 27 17:55:18 UTC 2019


This patch removes an unnecessary check as
the condition can never occur.

Index: primes.c
===================================================================
--- primes.c	(revision 355983)
+++ primes.c	(working copy)
@@ -129,7 +129,7 @@
 	switch (argc) {
 	case 2:
 		/* Start and stop supplied on the command line. */
-		if (argv[0][0] == '-' || argv[1][0] == '-')
+		if (argv[1][0] == '-')
 			errx(1, "negative numbers aren't permitted.");
 
 		errno = 0;
-- 
Steve


More information about the freebsd-current mailing list