aboutsummaryrefslogtreecommitdiffstats
path: root/doc/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/example.c')
-rw-r--r--doc/example.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/example.c b/doc/example.c
index 1f2708c..18aec1c 100644
--- a/doc/example.c
+++ b/doc/example.c
@@ -23,8 +23,6 @@ int main(int argc, char **argv)
{ SIMPLE_OPT_STRING_SET, '\0', "set-choice", true,
"a choice of one string from a NULL-terminated array",
"(str_a|str_b)", set },
- { SIMPLE_OPT_CHAR, 'c', "char", false,
- "(optionally) takes a character argument" },
{ SIMPLE_OPT_END },
};
@@ -116,7 +114,8 @@ int main(int argc, char **argv)
break;
case SIMPLE_OPT_STRING_SET:
- printf(", val: %s", set[options[i].val_string_set_idx]);
+ printf(", val: %s",
+ options[i].string_set[options[i].val_string_set_idx]);
break;
default: