From bb9a412a8c9736dc52fe9a7aee997ae5a6c582d8 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 10 May 2019 16:29:50 -0400 Subject: Use val instead of suboptarg suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? --- bin/hi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hi.c b/bin/hi.c index f3295217..9db51a65 100644 --- a/bin/hi.c +++ b/bin/hi.c @@ -679,7 +679,7 @@ int main(int argc, char *argv[]) { while (optarg[0]) { key = getsubopt(&optarg, (char *const *)OptionKey, &val); if (key >= OptionLen) { - errx(EX_USAGE, "no such option %s", suboptarg); + errx(EX_USAGE, "no such option %s", val); } opts[key] = (val ? val : ""); } -- cgit 1.4.1