From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 7 Nov 2011 17:44:28 -0600 Subject: [U-Boot] Continuation line alignment In-Reply-To: <4EB86AA8.30901@keymile.com> References: <1319647072-17504-1-git-send-email-gerlando.falauto@keymile.com> <1319647072-17504-2-git-send-email-gerlando.falauto@keymile.com> <20111105160958.F40D11893014@gemini.denx.de> <4EB84859.6000906@keymile.com> <20111107220505.E5386189301B@gemini.denx.de> <4EB86384.7010409@freescale.com> <4EB86AA8.30901@keymile.com> Message-ID: <4EB86D5C.9020500@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/07/2011 05:32 PM, Gerlando Falauto wrote: > On 11/08/2011 12:02 AM, Scott Wood wrote: >> Documentation/CodingStyle calls for something like this: >> >> if (himport_ex(&env_htab, (char *)default_environment, >> sizeof(default_environment), '\0', >> 0, 0, NULL, apply_function) == 0) { > > I would have thought this would make more sense (offset by 1, not 9): > > if (himport_ex(&env_htab, (char *)default_environment, > sizeof(default_environment), '\0', > 0, 0, NULL, apply_function) == 0) { Documentation/CodingStyle simply says continuation lines "are always substantially shorter than the parent and are placed substantially to the right". > Or maybe even: > > if (himport_ex(&env_htab, (char *)default_environment, > sizeof(default_environment), '\0', > 0, 0, NULL, apply_function) == 0) { > > which would save a lot of screen real estate. It would also make it harder to distinguish the continuation lines from the if-body: if (himport_ex(... sizeof(... 0, 0, ...) { body goes here, at the same column have to look for the brace to distinguish } -Scott