Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2016 19:12:31 +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: r309928 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201612121912.uBCJCVf6085670@repo.freebsd.org>

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

Log:
  If you're not going to make use of the products of a match() in awk
  (e.g., RSTART and RLENGTH variables) then use ~ instead of match()

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

Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 19:11:04 2016	(r309927)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 19:12:31 2016	(r309928)
@@ -95,8 +95,8 @@ dialog_country_select()
 		sub(/Regulatory.*/, "")
 		for (i = 1; i <= NF; i++) {
 			printf "%s", $i
-			if (match($i, /[[:lower:]]/))
-				if (match($(i+1), /[[:lower:]]/))
+			if ($i ~ /[[:lower:]]/)
+				if ($(i+1) ~ /[[:lower:]]/)
 					printf "\\\\\\ "
 				else
 					printf "\n"



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