Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions

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

 



On Tue, Apr 30, 2013 at 5:00 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> What is a Yoda condition?

---
Using if (constant == variable) instead of if (variable == constant),
like if (4 == foo).

Because it's like saying "if blue is the sky" or "if tall is the man".
---

-- 
Felipe Contreras
--
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]