Re: [PATCH 2/6] commit-graph.h: store object directory in 'struct commit_graph'

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

 



Martin Ågren <martin.agren@xxxxxxxxx> writes:

>> +               struct object_directory *odb;
>> +               if ((odb = find_odb(the_repository, opts.obj_dir)))
>> +                       graph = read_commit_graph_one(the_repository, odb);
>> +       }
>
> I'm a tiny bit allergic to this assignment-within-if. It's wrapped by
> another pair of parentheses, which both compilers and humans know to
> interpret as "trust me, this is not a mistake", but I still find this
> easier to read:
>
>   odb = find_odb(...);
>   if (odb)
>           ....

Yup.




[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