Thomas Rast <trast@xxxxxxxxxxxxxxx> a écrit :
Leila <muhtasib@xxxxxxxxx> writes:The structure is if (...) { /*code*/ } else { /*code*/ } Do not forget braces in the "else" part as the firt block needs it.I was under the impression that one liners didn't require parenthesis according to the style guidelines. I didn't realize that if the 'if' required it, then the else required it. I will make that change and remember it for the future. Thanks!It's not required, there's plenty of precedent, even one case within wt-status.c, of '} else'. Try running git grep '} else$'
It's not because "there's plenty of precedent" that we should not try to improve the format of the code. That's why there're coding style rules so that we can keep the improvements consistent. Thanks. Lucien Kong -- 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
[Newbies FAQ] [Linux Kernel Development] [Free Online Dating] [Gcc Help] [IETF Annouce] [DCCP] [Netdev] [Networking] [Security] [V4L] [Bugtraq] [Free Online Dating] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Linux SCSI] [Fedora Users] [Linux Resources]