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] [day] [month] [year] [list]
Message-Id: <201112030031.27965.rjw@sisk.pl>
Date:	Sat, 3 Dec 2011 00:31:27 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	pavel@....cz, len.brown@...el.com, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: Re: [PATCH] PM, kernel/power/user.c: Replace unintuitive 'if' condition with 'else'

On Friday, December 02, 2011, Srivatsa S. Bhat wrote:
> In the snapshot_ioctl() function, under SNAPSHOT_FREEZE, the code below
> freeze_processes() is a bit unintuitive. Improve it by replacing the
> second 'if' condition with an 'else' clause.
> 
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

Applied to linux-pm/linux-next.

Thanks,
Rafael


> ---
> 
>  kernel/power/user.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/power/user.c b/kernel/power/user.c
> index 7cc3f5b..8c64d1c 100644
> --- a/kernel/power/user.c
> +++ b/kernel/power/user.c
> @@ -259,7 +259,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
>  		error = freeze_processes();
>  		if (error)
>  			usermodehelper_enable();
> -		if (!error)
> +		else
>  			data->frozen = 1;
>  		break;
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ