Messages in this thread | | | Subject | Re: [PATCH] 2.5.27 sysctl | From | Ray Lee <> | Date | 22 Jul 2002 09:56:22 -0700 |
| |
Hello there,
> This is making the sysctl code acutally be written in C. > It wasn't mostly due to georgeous ommitted size array "forward > declarations". As a side effect it makes the table structure easier to > deduce. > > diff -urN linux-2.5.27/include/linux/sysctl.h linux/include/linux/sysctl.h > --- linux-2.5.27/include/linux/sysctl.h 2002-07-20 21:11:05.000000000 +0200 > +++ linux/include/linux/sysctl.h 2002-07-21 19:30:43.000000000 +0200 > @@ -126,7 +126,7 @@ > KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */ > KERN_CORE_USES_PID=52, /* int: use core or core.%pid */ > KERN_TAINTED=53, /* int: various kernel tainted flags */ > - KERN_CADPID=54, /* int: PID of the process to notify on CAD */ > + KERN_CADPID=54 /* int: PID of the process to notify on CAD */ > };
<snip>
The comma changes are gratuitous, as pure ANSI C explicitly allows such constructs. (It was intended to simplify automatic code generation, as well as for programmer ease to automatically deal with initializer lists.)
From the grammar section of the 2nd edition (ca. 1988) of K&R: initializer: assignment-expression { initializer-list } { initializer-list , }
...where initializer list is what one would expect.
Removing the size forward declarations does make the code quicker to read, though.
Ray
- 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/
| |