Re: [PATCH 3/3] trace-cmd: fold option parsing

From: Steven Rostedt
Date: Thu Mar 10 2011 - 08:16:13 EST


On Thu, 2011-03-10 at 17:58 +0800, Lai Jiangshan wrote:
> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>

Thanks!

>
> +#define OPT_debug 255
> +

>
> +#define OPT_cpu 255
> +#define OPT_events 254
> +#define OPT_kallsyms 253
> +

I wonder if it would look cleaner if we converted them all to enums:

enum {
OPT_kallsyms = 253,
OPT_events = 254,
OPT_cpu = 255,
};

As in the kernel, defines look ugly, and can have side-effects.

-- Steve


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