Re: [PATCH 2/4] object-file: refactor corrupt object diagnosis

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

 



Jeff King <peff@xxxxxxxx> writes:

> So maybe:
>
>   if (!oideq(real_oid, oid))
>
> instead? It's a little slower, but the point of this is to diagnose and
> die, so it's not exactly a hot path. :)

Very true, including the part that the original is fine because it
is localized and fairly obvious.  For a public function, we cannot
assume any additional constraints between oid and real_oid (other
than they are of the same "struct object_id *" type) like the two
pointers prepared locally in the original had, and use of oideq()
would be more appropriate here.

Thanks.





[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