indent(1): improve an error message
When producing a "[...] requires a parameter" error, provide the recognized name of the option instead of argument provided.
This commit is contained in:
parent
badef00d58
commit
0de58b3f46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334495
@ -325,7 +325,7 @@ set_option(char *arg)
|
||||
case PRO_INT:
|
||||
if (!isdigit(*param_start)) {
|
||||
need_param:
|
||||
errx(1, "%s: ``%s'' requires a parameter", option_source, arg - 1);
|
||||
errx(1, "%s: ``%s'' requires a parameter", option_source, p->p_name);
|
||||
}
|
||||
*p->p_obj = atoi(param_start);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user