net: netconsole: Remove unnecessary cast from bool

The 'enabled' variable is already a bool, so casting it to its value
is redundant.

Remove the superfluous cast, improving code clarity without changing
functionality.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20240709144403.544099-2-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Breno Leitao 2024-07-09 07:43:59 -07:00 committed by Jakub Kicinski
parent 5e724cb688
commit a9359e8b00

View File

@ -344,7 +344,7 @@ static ssize_t enabled_store(struct config_item *item,
goto out_unlock;
err = -EINVAL;
if ((bool)enabled == nt->enabled) {
if (enabled == nt->enabled) {
pr_info("network logging has already %s\n",
nt->enabled ? "started" : "stopped");
goto out_unlock;