[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hash and bitrotate
From: |
Jim Meyering |
Subject: |
Re: hash and bitrotate |
Date: |
Thu, 18 Jun 2009 21:44:18 +0200 |
Eric Blake wrote:
...
>>From dd342c74a01a02cd35f53da621d6ac122fd606f5 Mon Sep 17 00:00:00 2001
> From: Eric Blake <address@hidden>
> Date: Thu, 18 Jun 2009 13:31:11 -0600
> Subject: [PATCH] hash: make rotation more obvious
>
> * modules/hash (Depends-on): Add bitrotate and stdint.
> * lib/bitrotate.h (rotl_sz, rotr_sz): New functions.
> * lib/hash.c (headers): Drop limits.h. Add stdint.h.
> (SIZE_MAX): Rely on headers for definition.
> (hash_string) [USE_DIFF_HASH]: Use rotl_sz.
> (raw_hasher): Use rotr_sz.
> Suggested by Jim Meyering.
...
> diff --git a/lib/hash.c b/lib/hash.c
> index f2123b4..6b16e81 100644
> --- a/lib/hash.c
> +++ b/lib/hash.c
> @@ -25,10 +25,11 @@
>
> #include <config.h>
>
> +#include "bitrotate.h"
> #include "hash.h"
> #include "xalloc.h"
Looks fine, but please keep hash.h first, i.e.,
#include "hash.h"
#include "bitrotate.h"
#include "xalloc.h"
- Re: hash resizing bug, (continued)
- Re: hash resizing bug, Jim Meyering, 2009/06/17
- Re: hash resizing bug, Eric Blake, 2009/06/18
- Re: hash resizing bug, Jim Meyering, 2009/06/18
- Re: hash resizing bug, Jim Meyering, 2009/06/18
- Re: hash resizing bug, Jim Meyering, 2009/06/18
- Re: hash resizing bug, Eric Blake, 2009/06/18
- Re: hash resizing bug, Jim Meyering, 2009/06/18
- Re: hash resizing bug, Eric Blake, 2009/06/18
- hash and bitrotate (was: hash resizing bug), Eric Blake, 2009/06/18
- Re: hash and bitrotate, Eric Blake, 2009/06/18
- Re: hash and bitrotate,
Jim Meyering <=
- Re: hash and bitrotate, Simon Josefsson, 2009/06/18
- Re: hash resizing bug, Jim Meyering, 2009/06/18
- Re: hash resizing bug, Ben Pfaff, 2009/06/18
- another hash cleanup (was: hash resizing bug), Eric Blake, 2009/06/18
- Re: another hash cleanup, Jim Meyering, 2009/06/18
- Re: another hash cleanup, Eric Blake, 2009/06/18
- Re: another hash cleanup, Jim Meyering, 2009/06/18
- Re: another hash cleanup, Eric Blake, 2009/06/18
- Re: another hash cleanup, Jim Meyering, 2009/06/19
- Re: another hash cleanup, Eric Blake, 2009/06/19