lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Feb 2014 08:57:38 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	minyard@....org
Cc:	OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Russ Anderson <rja@....com>,
	Matthew Garrett <matthew.garrett@...ula.com>, lenb@...nel.org,
	rjw@...ysocki.net, linux-acpi@...r.kernel.org,
	Corey Minyard <cminyard@...sta.com>
Subject: Re: [PATCH 2/3] ipmi: Turn off all activity on an idle ipmi interface

On Sun, Feb 23, 2014 at 08:23:35PM -0600, minyard@....org wrote:
> @@ -1194,7 +1223,17 @@ int ipmi_set_gets_events(ipmi_user_t user, int val)
>  	INIT_LIST_HEAD(&msgs);
>  
>  	spin_lock_irqsave(&intf->events_lock, flags);
> -	user->gets_events = val;
> +	if (user->gets_events == !!val)
> +		goto out;
> +
> +	user->gets_events = !!val;

Why not have val declared as bool and let compiler convert as needed?

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists