summary refs log tree commit diff
path: root/bin/order.y
diff options
context:
space:
mode:
Diffstat (limited to 'bin/order.y')
-rw-r--r--bin/order.y11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/order.y b/bin/order.y
index c2e87971..05be9838 100644
--- a/bin/order.y
+++ b/bin/order.y
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019  C. McEnroe <june@causal.agency>
+/* Copyright (C) 2019  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sysexits.h>
 
 #define YYSTYPE char *
 
@@ -32,7 +31,7 @@ static char *fmt(const char *format, ...) {
 	va_start(ap, format);
 	vasprintf(&str, format, ap);
 	va_end(ap);
-	if (!str) err(EX_OSERR, "vasprintf");
+	if (!str) err(1, "vasprintf");
 	return str;
 }
 
@@ -179,17 +178,17 @@ static int yylex(void) {
 }
 
 static void yyerror(const char *str) {
-	errx(EX_DATAERR, "%s", str);
+	errx(1, "%s", str);
 }
 
 int main(int argc, char *argv[]) {
 	for (int i = 1; i < argc; ++i) {
 		in = fmemopen(argv[i], strlen(argv[i]), "r");
-		if (!in) err(EX_OSERR, "fmemopen");
+		if (!in) err(1, "fmemopen");
 		yyparse();
 		fclose(in);
 	}
-	if (argc > 1) return EX_OK;
+	if (argc > 1) return 0;
 	in = stdin;
 	yyparse();
 }