svn commit: r334495 - head/usr.bin/indent
Piotr Pawel Stefaniak
pstef at FreeBSD.org
Fri Jun 1 20:45:36 UTC 2018
Author: pstef
Date: Fri Jun 1 20:45:35 2018
New Revision: 334495
URL: https://svnweb.freebsd.org/changeset/base/334495
Log:
indent(1): improve an error message
When producing a "[...] requires a parameter" error, provide the recognized
name of the option instead of argument provided.
Modified:
head/usr.bin/indent/args.c
Modified: head/usr.bin/indent/args.c
==============================================================================
--- head/usr.bin/indent/args.c Fri Jun 1 19:58:19 2018 (r334494)
+++ head/usr.bin/indent/args.c Fri Jun 1 20:45:35 2018 (r334495)
@@ -325,7 +325,7 @@ found:
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;
More information about the svn-src-all
mailing list