All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Lee <ray-lk@madrabbit.org>
To: dalecki@evision.ag
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.27 sysctl
Date: 22 Jul 2002 09:56:22 -0700	[thread overview]
Message-ID: <1027356983.2024.1056.camel@orca> (raw)

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



             reply	other threads:[~2002-07-22 16:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-22 16:56 Ray Lee [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-24  2:21 [Patch] 2.5.27 sysctl Marco C. Mason
2002-07-20 19:22 Linux-2.5.27 Linus Torvalds
2002-07-22 10:42 ` [PATCH] 2.5.27 sysctl Marcin Dalecki
2002-07-22 10:53   ` Christoph Hellwig
2002-07-22 10:56     ` Marcin Dalecki
2002-07-22 11:02       ` Christoph Hellwig
2002-07-22 11:03         ` Marcin Dalecki
2002-07-22 12:51           ` Alexander Viro
2002-07-22 13:02             ` Marcin Dalecki
2002-07-22 11:13       ` Christoph Hellwig
2002-07-22 11:19       ` Dave Jones
2002-07-22 11:19       ` bart
2002-07-22 11:21       ` BALBIR SINGH
2002-07-22 12:30       ` Alan Cox
2002-07-22 11:21         ` Marcin Dalecki
2002-07-22 15:57   ` Daniel Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1027356983.2024.1056.camel@orca \
    --to=ray-lk@madrabbit.org \
    --cc=dalecki@evision.ag \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.