diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 16:52:02 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 16:52:02 +0000 |
| commit | 9e32456c8caa870449f63f279cf5020b51e47d1c (patch) | |
| tree | 84fbc7518e3e123e2f79b950dddb4018d835f204 /util | |
| parent | 7ae2288c1025ac8369bb10a1f77f9540eec06a8f (diff) | |
util/nvmutil: clearer intent on struct data
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index faeee807..4068c0c4 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -100,12 +100,12 @@ static const char rmac[] = "xx:xx:xx:xx:xx:xx"; static const char *fname = ""; static const char *argv0; -struct op { +struct commands { const char *str; void (*cmd)(void); int args; }; -static const struct op ops[] = { +static const struct commands command[] = { { "dump", cmd_dump, 3 }, { "setmac", cmd_setmac, 3 }, { "swap", cmd_swap, 3 }, @@ -234,14 +234,14 @@ set_cmd(int argc, char *argv[]) return; } - for (i = 0; i < items(ops) && cmd == NULL; i++) { - if (strcmp(argv[2], ops[i].str) != 0) + for (i = 0; i < items(command) && cmd == NULL; i++) { + if (strcmp(argv[2], command[i].str) != 0) continue; - if (argc >= ops[i].args) { - cmd = ops[i].cmd; + if (argc >= command[i].args) { + cmd = command[i].cmd; break; } - err(EINVAL, "Too few args: command '%s'", ops[i].str); + err(EINVAL, "Too few args: command '%s'", command[i].str); } } |
