On 10/15/2010 03:25 PM, Matthias Bolte wrote:
> typedef enum {
> - VSH_OT_NONE = 0, /* none */
> - VSH_OT_BOOL, /* boolean option */
> - VSH_OT_STRING, /* string option */
> - VSH_OT_INT, /* int option */
> - VSH_OT_DATA /* string data (as non-option) */
> + VSH_OT_BOOL, /* boolean option */
You lost (or explicitly removed) the = 0 here, but that's okay.
Explicitly dropped (C89 defaults enums to start from 0, and I tend to
favor minimal code solutions). Besides, and since this enum is not
exported, it doesn't matter _what_ we start with, as long as the values
are distinct, so the compiler default is as good as any explicit setting.
> + VSH_OT_STRING, /* string option */
> + VSH_OT_INT, /* int option */
> + VSH_OT_DATA, /* string data (as non-option) */
> + VSH_OT_ARGV /* remaining arguments, opt->name should be "" */
> } vshCmdOptType;
>
ACK.
You really try to cover all edge cases here :)
Thanks - I sure tried! (although I didn't use gcov, so I probably missed
some). I've pushed the series now.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org