Date: Mon, 19 Feb 2018 21:54:53 +0000 From: Alexander Nasonov <alnsn@yandex.ru> To: Kyle Evans <kevans@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329585 - head/stand/lua Message-ID: <20180219215453.GA10409@neva> In-Reply-To: <201802191634.w1JGYNAE003191@repo.freebsd.org> References: <201802191634.w1JGYNAE003191@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Kyle Evans wrote:
> +function core.isSingleUserBoot()
> + local single_user = loader.getenv("boot_single");
> + return single_user ~= nil and single_user:lower() == "yes";
> +end
Just curious, why do you end all lines with semi-colons? It's not very
common in Lua code.
This version looks more idiomatic:
function core.isSingleUserBoot()
local single_user = loader.getenv("boot_single")
return single_user and single_user:lower() == "yes"
end
--
Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180219215453.GA10409>
