Re: [PATCH 3/7] add description parameter to OPT__QUIET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 08, 2010 at 07:00:29PM +0100, Renà Scharfe wrote:

> Allows better help text to be defined than "be quiet".  Also make use
> of the macro in a place that already had a different description.  No
> object code changes intended.

Maybe my "don't repeat yourself" spider sense is over-reacting, but of
12 callsites, 11 of them will continue to use "be quiet". Maybe instead
of:

> -#define OPT__QUIET(var)    OPT_BOOLEAN('q', "quiet",   (var), "be quiet")
> +#define OPT__QUIET(var, h)    OPT_BOOLEAN('q', "quiet",   (var), (h))

we could have:

  #define OPT__QUIET_H(var, h) OPT_BOOLEAN('q', "quiet", (var), (h))
  #define OPT__QUIET(var) OPT__QUIET_H(var, "be quiet")

which would limit your patch to changing a single callsite.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]