Re: [RFC PATCH 1/5] builtin/checkout: avoid usage of '!!'

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

 



Wait, I missed a contradiction here.

On Wednesday 20 September 2017 09:30 AM, Junio C Hamano wrote:
....  And !!ptr is a shorter and more established way than ptr
!= NULL to turn non-NULL ness into an int boolean,

Documentation/SubmittingPatches says:

 - Some clever tricks, like using the !! operator with arithmetic
   constructs, can be extremely confusing to others.
If !!ptr is a **more established way** to then why should it confuse others. Of course, !!ptr was stated as an "exception-rule" where ptr is a pointer (possibly NULL). That makes
me wonder in what case is it "confusing" at all?

---
Kaartic



[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