Re: [PATCH v2 34/36] Convert lookup_replace_object to struct object_id

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

 



On Mon, Feb 26, 2018 at 4:12 AM, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> diff --git a/sha1_file.c b/sha1_file.c
> index 7493bc7f11..c41fbe2f01 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -1227,22 +1227,18 @@ int oid_object_info_extended(const struct object_id *oid, struct object_info *oi
>         static struct object_info blank_oi = OBJECT_INFO_INIT;
>         struct pack_entry e;
>         int rtype;
> -       const unsigned char *real = (flags & OBJECT_INFO_LOOKUP_REPLACE) ?
> -                                   lookup_replace_object(oid->hash) :
> -                                   oid->hash;
> +       const struct object_id *real = (flags & OBJECT_INFO_LOOKUP_REPLACE) ?
> +                                      lookup_replace_object(oid) :
> +                                      oid;

Micro nit. Perhaps we should replace "? :" with a real "if" construct
-- 
Duy



[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