2008/12/22 Krzysztof Halasa <khc@pm.waw.pl>:For this specific issue the important aspect is to improve readability (and not just eventually satisfy some warning from a tool), which I assume there is no disagrement on. Now what constitutes improved readbility on the other hand is another issue, and I guess there are next to as many oppinions as developers... :) I would most certainly prefer to have code look consistently and always have brackets, even in the case of just one body line. Of secondary importance is the benefit that always using brackets makes them much more merge friendly. Consider the following scenario: Common base: do result = readl(mdio_addr); while ((result & 0xC0000000) != 0x80000000 && --boguscnt > 0); Branch 1 do { result = readl(mdio_addr); do_something(); } while ((result & 0xC0000000) != 0x80000000 && --boguscnt > 0); Branch 2 do result = readl(mdio_addr); while (NOT_OK(result) && --boguscnt > 0); In this case if both branch 1 and 2 are merged, there will be a merge conflict that has to be resolved manually. If the brackets had been in place from the start tools should be able to resolv this automatically. BR Håkon Løvdal
| Andrew Morton | 2.6.23-rc3-mm1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Yinghai Lu | Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption |
| Frederik Deweerdt | [-mm patch] remove tcp header from tcp_v4_check (take #2) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Herbert Xu | Re: [PATCH 2/3][NET_BATCH] net core use batching |
git: | |
