1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: do not store _VAL name string

String enum_name[] is unused so remove is with
all generated strings.

Reoder struct members, so there are no holes.
This commit is contained in:
Zdenek Kabelac 2024-05-17 17:01:09 +02:00
parent dd78573073
commit 59345da03f
2 changed files with 3 additions and 4 deletions

View File

@ -39,7 +39,7 @@ struct cmd_name {
/* create table of value names, e.g. String, and corresponding enum from vals.h */
static const struct val_name val_names[VAL_COUNT + 1] = {
#define val(a, b, c, d) { # a, a, b, c, d },
#define val(a, b, c, d) { b, d, c, a },
#include "vals.h"
#undef val
};

View File

@ -239,11 +239,10 @@ struct opt_name {
/* see global val_names[] */
struct val_name {
const char enum_name[30]; /* "foo_VAL" */
uint16_t val_enum; /* foo_VAL */
int (*fn) (struct cmd_context *cmd, struct arg_values *av); /* foo_arg() */
const char name[32]; /* FooVal */
const char *usage;
const char name[30]; /* FooVal */
uint16_t val_enum; /* foo_VAL */
};
/* see global lv_props[] */