On 07/07/10 03:03, Jim Meyering wrote:

> Do you know of any system on which sizeof dev_t is larger
> than two times sizeof size_t?  I was wondering if the added
> (sizeof dev % sizeof h != 0) term is actually necessary anywhere.
> The largest dev_t I've seen is 8 bytes wide.  Just curious.
> I know it is required, just in case.

I don't know of any, no.  I imagine there may be some hosts
that have 16-bit size_t and 64-bit ino_t, but the GNU coding standards
say that we don't have to worry about such hosts.  The general-case
code is mainly there to document the general case and to make it
clear what the intent is: I can't imagine any host where the
(sizeof dev % sizeof h != 0) term is actually needed.

It's just a hash function, so the code will still work even
if the loop is removed completely; but it won't hash nearly
as well on Cygwin, I expect.



Reply via email to