Re: [PATCH] rebase: clarify conditionals in todo_list_to_strbuf()

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

 



On Thu, Mar 23, 2023 at 04:32:41PM -0400, Taylor Blau wrote:
I dunno. I think seeing adjacent

   if (item->command == TODO_ABC)

and

   if (item->command == TODO_XYZ)

makes it clear that these two are mutually exclusive, since TODO_ABC !=
TODO_XYZ.

no, because you have to prove to yourself that the queried value doesn't change in between. and so does the compiler, which may fail to tail-merge the embedded strbuf_addstr() calls as a consequence.

Specifically: why not combine these two with if-statement that proceeds
it? That might look something like: [...]

i don't see what you're referring to, so i guess you got confused about the location of the code in question?



[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