Date: Fri, 27 Dec 2019 09:55:10 -0800 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: freebsd-current@freebsd.org Subject: [PATCH] primes(6) -- remove unnecessary code Message-ID: <20191227175458.GA60597@troutmask.apl.washington.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191227175458.GA60597>
