Re: [PATCH] hash: fix lookup_hash semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 22 Feb 2008, Jeff King wrote:
>
> We were returning the _address of_ the stored item (or NULL)
> instead of the item itself. While this sort of indirection
> is useful for insertion (since you can lookup and then
> modify), it is unnecessary for read-only lookup.

Gaah. That code returned the pointer-to-a-pointer exactly because of the 
insert case, but then to clean it up I had split it up into that internal 
"lookup_hash_entry()" case, but left the broken semantics for 
lookup_hash().

Stupid.

Your patch is obviously correct, and should probably go into maint just so 
that no other code makes the mistake of using that broken interface.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux