[OpenAFS] Strange access problems on one client
Thu, 11 Oct 2007 22:52:50 -0400
-----BEGIN PGP SIGNED MESSAGE-----
I think Derrick was being careful when he said it a) fixed the issue and
b) was harmless.
Marc Dionne wrote:
> Carson Gaspar wrote:
>> Hans-Werner Paulsen wrote:
>>> On Sun, Oct 07, 2007 at 01:15:00PM -0400, Marc Dionne wrote:
>>>> + else if (hval >= 1<<31)
>>> this patch is fine for architectures where the size of "unsigned long"
>>> is 4 bytes. But on the x86_64 architecture this will not work, because
>>> the size is 8 bytes. One can use "unsigned int".
>> Ummm... no. This whole thing is way too fragile. If you care about how
>> many bits the variable has, you MUST use something like uint32_t. Or
>> you can not care, and use sizeof() to generate your comparison. But
>> you MUST NOT use "int" or "long" and hard-code bit shifts.
> Sure enough - with the original patch I was trying to confirm that this
> was indeed the issue, and didn't try to be generic.
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI 48104
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----