Skip to content

Commit

Permalink
Add more specific comments about option value for flag to/from option…
Browse files Browse the repository at this point in the history
… renaming
  • Loading branch information
HuidaeCho committed Nov 22, 2023
1 parent aefc936 commit 5adef9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/gis/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,8 @@ void set_flag(int f)
}
}
else {
/* if renamed to a new option (less information given), fatal error
*/
/* if renamed to a new option (no option value given but will be
* required), fatal error */
struct Option *opt = NULL;
for (opt = &st->first_option; opt; opt = opt->next_opt) {
if (strcmp(renamed_key, opt->key) == 0) {
Expand Down Expand Up @@ -1229,8 +1229,8 @@ void set_option(const char *string)

renamed_key = get_renamed_option(the_key);
if (renamed_key) {
/* if renamed to a new flag (information loss occurs), fatal error
*/
/* if renamed to a new flag (option value given but will be lost),
* fatal error */
if (*renamed_key == '-') {
if (renamed_key[1] == '-')
G_asprintf(&err,
Expand Down

0 comments on commit 5adef9f

Please sign in to comment.