Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2018 21:07:46 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335265 - head/usr.bin/units
Message-ID:  <201806162107.w5GL7kHG098646@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Sat Jun 16 21:07:46 2018
New Revision: 335265
URL: https://svnweb.freebsd.org/changeset/base/335265

Log:
  units: fix some nits
  
  - prefer braces to abusing the `,` operator
  - mark dead function as dead
  - remove dead break

Modified:
  head/usr.bin/units/units.c

Modified: head/usr.bin/units/units.c
==============================================================================
--- head/usr.bin/units/units.c	Sat Jun 16 20:00:41 2018	(r335264)
+++ head/usr.bin/units/units.c	Sat Jun 16 21:07:46 2018	(r335265)
@@ -625,8 +625,10 @@ compareproducts(char **one, char **two)
 			two++;
 		else if (strcmp(*one, *two))
 			return 1;
-		else
-			one++, two++;
+		else {
+			one++;
+			two++;
+		}
 	}
 	return 0;
 }
@@ -726,7 +728,7 @@ showanswer(struct unittype * have, struct unittype * w
 }
 
 
-static void 
+static void __dead2
 usage(void)
 {
 	fprintf(stderr,
@@ -805,7 +807,6 @@ main(int argc, char **argv)
 			else
 				printf("Units data file not found");
 			exit(0);
-			break;
 		case 'h':
 			/* FALLTHROUGH */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806162107.w5GL7kHG098646>