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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to