[PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations.

Steven Cole (elenstev@mesatop.com)
30 May 2003 13:57:13 -0600


Maybe the following should be unnecessary after all these years since
the ANSI C standard was introduced, but several files associated with
zlib were using the old-style function declaration.

So, here is a proposed addition to CodingStyle, just to make it clear.

Steven

--- bk-current/Documentation/CodingStyle Fri May 30 09:20:33 2003
+++ linux/Documentation/CodingStyle Fri May 30 13:16:30 2003
@@ -149,6 +149,21 @@
and it gets confused. You know you're brilliant, but maybe you'd like
to understand what you did 2 weeks from now.

+Function declarations should be new-style:
+
+int foo(long bar, long day, struct magic *xyzzy)
+or
+int foo(
+ long bar,
+ long day,
+ struct magic *xyzzy
+)
+
+Old-style function declarations are deprecated:
+
+int foo(bar, day, xyzzy)
+long bar, day;
+struct magic *xyzzy;

Chapter 5: Commenting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/