device: renew dhcp leases on awake for software devices
[NetworkManager.git] / CONTRIBUTING
index baf6d25..d3ea0ce 100644 (file)
@@ -17,3 +17,22 @@ with #ifdef MY_DEFINE / #endif in the code.
                        ...
                }
 
+* Keep a space between the function name and the opening '('.
+    GOOD: g_strdup (x)
+    BAD:  g_strdup(x)
+
+* C-style comments
+    GOOD: f(x);  /* comment */
+    BAD:  f(x);  // comment
+
+* Keep assignments in the variable declaration area pretty short.
+    GOOD: MyObject *object;
+    BAD: MyObject *object = complex_and_long_init_function(arg1, arg2, arg3);
+
+* 80-cols is a guideline, don't make the code uncomfortable in order to fit in
+  less than 80 cols.
+
+* Constants are CAPS_WITH_UNDERSCORES and use the preprocessor.
+    GOOD: #define MY_CONSTANT 42
+    BAD:  static const unsigned myConstant = 42;
+