On Sun, 29 Aug 2010 17:12:38 +0200, Diego Biurrun <[email protected]> wrote:
This 8 characters idea is completely arbitrary and IMO not an improvement
at all. Creating more and arbitrary rules is not good.
I agree, but I saw some instances of code in HIPL using an indent of 8
spaces so I assumed that was the right thing to do... well in this case,
there's no need to change doc/HACKING I think.
@@ -553,6 +555,23 @@
+static void blah(int a, int b) {
+ /* excessive nesting should be avoided but if it can't,
+ * remember the following rules */
+ if(a) {
+ if(b) {
+ struct opaque blah;
*sigh* - This is not even in K&R style. May I politely suggest that you
go back to reading its definition? (hint: spaces, keywords)
Alright
+ /* opening '(' on next line if no argument fits */
+ yet_another_function_with_a_long_name
+ (a_function_with_a_long_name(NULL, &blah,
0xC0FFEE));
This is not K&R style and completely counterproductive. You destroy the
visual cue that a string followed by an opening parenthesis gives you -
in K&R style you immediately know it's a function call, now you don't
anymore.
I prefer the "dangling" opening parenthesis too, in this case I was
inspired by another mail of yours:
On Fri, 20 Aug 2010 16:56:49 +0200, Diego Biurrun <[email protected]> wrote:
On Thu, Aug 19, 2010 at 09:34:25AM +0000, [email protected] wrote:
------------------------------------------------------------
revno: 4898
committer: Artturi Karila <[email protected]>
branch nick: trunk
timestamp: Thu 2010-08-19 12:32:20 +0300
message:
Fixed 'cast discards qualifiers' warnings in hip_get_next_param()
--- firewall/conntrack.c 2010-08-18 16:21:16 +0000
+++ firewall/conntrack.c 2010-08-19 09:32:20 +0000
@@ -925,10 +925,12 @@
// store the public key separately
// store function pointer for verification
if (hip_get_host_id_algo(tuple->hip_tuple->data->src_hi) ==
HIP_HI_RSA) {
- tuple->hip_tuple->data->src_pub_key =
hip_key_rr_to_rsa((struct hip_host_id_priv *) host_id, 0);
+ tuple->hip_tuple->data->src_pub_key = hip_key_rr_to_rsa(
+ (const struct hip_host_id_priv *)
host_id, 0);
Breaking functions at the opening parenthesis looks ugly IMO.
_______________________________________________
Mailing list: https://launchpad.net/~hipl-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~hipl-core
More help : https://help.launchpad.net/ListHelp