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]
Date:	Tue, 16 Jun 2015 11:27:09 -0400
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel@...r.kernel.org, Julia Lawall <Julia.Lawall@...6.fr>,
	linux-nfs@...r.kernel.org
Subject: Re: [PATCH 1/1 linux-next] nfsd: use swap() in sort_pacl_range()

Applying, thanks.--b.

On Fri, Jun 12, 2015 at 06:58:57PM +0200, Fabian Frederick wrote:
> Use kernel.h macro definition.
> 
> Thanks to Julia Lawall for Coccinelle scripting support.
> 
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  fs/nfsd/nfs4acl.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
> index 7e10e2a..eb5accf 100644
> --- a/fs/nfsd/nfs4acl.c
> +++ b/fs/nfsd/nfs4acl.c
> @@ -372,7 +372,6 @@ pace_gt(struct posix_acl_entry *pace1, struct posix_acl_entry *pace2)
>  static void
>  sort_pacl_range(struct posix_acl *pacl, int start, int end) {
>  	int sorted = 0, i;
> -	struct posix_acl_entry tmp;
>  
>  	/* We just do a bubble sort; easy to do in place, and we're not
>  	 * expecting acl's to be long enough to justify anything more. */
> @@ -382,9 +381,8 @@ sort_pacl_range(struct posix_acl *pacl, int start, int end) {
>  			if (pace_gt(&pacl->a_entries[i],
>  				    &pacl->a_entries[i+1])) {
>  				sorted = 0;
> -				tmp = pacl->a_entries[i];
> -				pacl->a_entries[i] = pacl->a_entries[i+1];
> -				pacl->a_entries[i+1] = tmp;
> +				swap(pacl->a_entries[i],
> +				     pacl->a_entries[i + 1]);
>  			}
>  		}
>  	}
> -- 
> 2.4.2
--
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