Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2016 19:24:32 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309930 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201612121924.uBCJOW2g089710@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Mon Dec 12 19:24:32 2016
New Revision: 309930
URL: https://svnweb.freebsd.org/changeset/base/309930

Log:
  Use ternary operator

Modified:
  head/usr.sbin/bsdinstall/scripts/wlanconfig

Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 19:16:35 2016	(r309929)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 19:24:32 2016	(r309930)
@@ -96,10 +96,7 @@ dialog_country_select()
 		for (i = 1; i <= NF; i++) {
 			printf "%s", $i
 			if ($i ~ /[[:lower:]]/)
-				if ($(i+1) ~ /[[:lower:]]/)
-					printf "\\\\\\ "
-				else
-					printf "\n"
+				printf $(i+1) ~ /[[:lower:]]/ ? "\\\\\\ " : "\n"
 			else
 				printf " "
 		}



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