summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-05-10 16:29:50 -0400
committerJune McEnroe <june@causal.agency>2019-05-10 16:29:50 -0400
commitbb9a412a8c9736dc52fe9a7aee997ae5a6c582d8 (patch)
treefadd55637ab195a8010e5a493fbf9da89a2d39b9
parentAdd Parable of the Sower (diff)
downloadsrc-bb9a412a8c9736dc52fe9a7aee997ae5a6c582d8.tar.gz
src-bb9a412a8c9736dc52fe9a7aee997ae5a6c582d8.zip
Use val instead of suboptarg
suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on
failure?
-rw-r--r--bin/hi.c2
1 files changed, 1 insertions, 1 deletions
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 : "");
 				}
r-highlight'> 2017-12-15Day 10June McEnroe 2017-12-14Day 9, part 2June McEnroe 2017-12-14Day 9June McEnroe I was really sick at the start of the week, okay? 2017-12-09Day 8, part 2June McEnroe 2017-12-09Day 8June McEnroe 2017-12-09Day 7, part 2June McEnroe I don't even know what this is. Don't look at it. 2017-12-08Day 7June McEnroe 2017-12-06Day 6, part 2June McEnroe 2017-12-06Day 6June McEnroe 2017-12-05Day 5, part 2June McEnroe 2017-12-05Day 5June McEnroe 2017-12-04Day 4, part 2June McEnroe That ugly sort map though. 2017-12-04Day 4June McEnroe 2017-12-03Day 3, part 2June McEnroe I am super surprised that worked on the first try. 2017-12-03Day 3, clean upJune McEnroe 2017-12-03Day 3June McEnroe This is fucking awful and I'm angry. 2017-12-02Day 2, part 2June McEnroe 2017-12-02Day 2June McEnroe 2017-12-01Day 1, part 2June McEnroe 2017-12-01Day 1June McEnroe 2017-11-27Move to 2016 directoryJune McEnroe