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 .. "'")
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to