(parse_opt): Use arg instead of optarg. Thanks James Dolter for reporting.
Showing
1 changed file
with
7 additions
and
7 deletions
... | @@ -79,23 +79,23 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -79,23 +79,23 @@ parse_opt (int key, char *arg, struct argp_state *state) |
79 | switch (key) | 79 | switch (key) |
80 | { | 80 | { |
81 | case 'c': | 81 | case 'c': |
82 | program_expr = optarg; | 82 | program_expr = arg; |
83 | *(int *)state->input = state->next; | 83 | *(int *)state->input = state->next; |
84 | state->next = state->argc; | 84 | state->next = state->argc; |
85 | break; | 85 | break; |
86 | 86 | ||
87 | case 's': | 87 | case 's': |
88 | program_file = optarg; | 88 | program_file = arg; |
89 | *(int *)state->input = state->next; | 89 | *(int *)state->input = state->next; |
90 | state->next = state->argc; | 90 | state->next = state->argc; |
91 | break; | 91 | break; |
92 | 92 | ||
93 | case 'f': | 93 | case 'f': |
94 | program_file = optarg; | 94 | program_file = arg; |
95 | break; | 95 | break; |
96 | 96 | ||
97 | case 'e': | 97 | case 'e': |
98 | program_expr = optarg; | 98 | program_expr = arg; |
99 | break; | 99 | break; |
100 | 100 | ||
101 | case 'd': | 101 | case 'd': |
... | @@ -103,15 +103,15 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -103,15 +103,15 @@ parse_opt (int key, char *arg, struct argp_state *state) |
103 | break; | 103 | break; |
104 | 104 | ||
105 | case 'g': | 105 | case 'g': |
106 | append_arg (optarg); | 106 | append_arg (arg); |
107 | break; | 107 | break; |
108 | 108 | ||
109 | case 'M': | 109 | case 'M': |
110 | default_mailbox = optarg; | 110 | default_mailbox = arg; |
111 | break; | 111 | break; |
112 | 112 | ||
113 | case 'u': | 113 | case 'u': |
114 | user_name = optarg ? optarg : who_am_i (); | 114 | user_name = arg ? arg : who_am_i (); |
115 | break; | 115 | break; |
116 | 116 | ||
117 | default: | 117 | default: | ... | ... |
-
Please register or sign in to post a comment