Author: kevans
Date: Wed Feb 21 01:39:33 2018
New Revision: 329687
URL: https://svnweb.freebsd.org/changeset/base/329687

Log:
  lualoader: Drop explicit boolean tests; b or not b

Modified:
  head/stand/lua/config.lua
  head/stand/lua/core.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/config.lua
==============================================================================
--- head/stand/lua/config.lua   Wed Feb 21 01:37:22 2018        (r329686)
+++ head/stand/lua/config.lua   Wed Feb 21 01:39:33 2018        (r329687)
@@ -315,7 +315,7 @@ function config.parse(name, silent)
                                end
                        end
 
-                       if found == false then
+                       if not found then
                                print("Malformed line (" .. n .. "):\n\t'" ..
                                    line .. "'")
                                status = false

Modified: head/stand/lua/core.lua
==============================================================================
--- head/stand/lua/core.lua     Wed Feb 21 01:37:22 2018        (r329686)
+++ head/stand/lua/core.lua     Wed Feb 21 01:39:33 2018        (r329687)
@@ -106,7 +106,7 @@ function core.setVerbose(b)
                b = not core.verbose
        end
 
-       if b == true then
+       if b then
                loader.setenv("boot_verbose", "YES")
        else
                loader.unsetenv("boot_verbose")
@@ -119,7 +119,7 @@ function core.setSingleUser(b)
                b = not core.su
        end
 
-       if b == true then
+       if b then
                loader.setenv("boot_single", "YES")
        else
                loader.unsetenv("boot_single")
@@ -131,7 +131,7 @@ function core.getACPIPresent(checkingSystemDefaults)
        local c = loader.getenv("hint.acpi.0.rsdp")
 
        if c ~= nil then
-               if checkingSystemDefaults == true then
+               if checkingSystemDefaults then
                        return true
                end
                -- Otherwise, respect disabled if it's set
@@ -146,7 +146,7 @@ function core.setACPI(b)
                b = not core.acpi
        end
 
-       if b == true then
+       if b then
                loader.setenv("acpi_load", "YES")
                loader.setenv("hint.acpi.0.disabled", "0")
                loader.unsetenv("loader.acpi_disabled_by_user")
@@ -162,7 +162,7 @@ function core.setSafeMode(b)
        if b == nil then
                b = not core.sm
        end
-       if b == true then
+       if b then
                loader.setenv("kern.smp.disabled", "1")
                loader.setenv("hw.ata.ata_dma", "0")
                loader.setenv("hw.ata.atapi_dma", "0")

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua     Wed Feb 21 01:37:22 2018        (r329686)
+++ head/stand/lua/menu.lua     Wed Feb 21 01:39:33 2018        (r329687)
@@ -411,7 +411,7 @@ function menu.skip()
 end
 
 function menu.autoboot()
-       if menu.already_autoboot == true then
+       if menu.already_autoboot then
                return
        end
        menu.already_autoboot = true
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to