Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2018 03:43:10 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329899 - head/stand/lua
Message-ID:  <201802240343.w1O3hA0E072454@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Feb 24 03:43:10 2018
New Revision: 329899
URL: https://svnweb.freebsd.org/changeset/base/329899

Log:
  lualoader: Correct test and name
  
  The functionality was correct, but our style guidelines tend to request that
  we shy away from using boolean operations in place of explicit comparisons
  to nil.

Modified:
  head/stand/lua/config.lua

Modified: head/stand/lua/config.lua
==============================================================================
--- head/stand/lua/config.lua	Sat Feb 24 03:38:51 2018	(r329898)
+++ head/stand/lua/config.lua	Sat Feb 24 03:43:10 2018	(r329899)
@@ -130,11 +130,11 @@ local function check_nextboot()
 		return
 	end
 
-	local function check_nextboot_disabled(text)
-		return not text:match("^nextboot_enable=\"NO\"")
+	local function check_nextboot_enabled(text)
+		return text:match("^nextboot_enable=\"NO\"") == nil
 	end
 
-	if not config.parse(nextboot_file, true, check_nextboot_disabled) then
+	if not config.parse(nextboot_file, true, check_nextboot_enabled) then
 		-- This only fails if it actually hit a parse error
 		print("Failed to parse nextboot configuration: '" ..
 		    nextboot_file .. "'")



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