diff options
Diffstat (limited to 'tests/binpack.c')
-rw-r--r-- | tests/binpack.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/binpack.c b/tests/binpack.c index b54ed80..482e658 100644 --- a/tests/binpack.c +++ b/tests/binpack.c @@ -18,6 +18,8 @@ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> +#include <string.h> +#include <errno.h> #include "pack.h" #include "err.h" @@ -52,11 +54,12 @@ main(int argc, char **argv) pi = packcomp(argv[0], &end); if (!pi) { - error("out of memory"); - abort(); - } - if (*end) { - error("compile error near %s", end); + if (errno == EINVAL) { + error("%s: bad dataspec near %s", argv[0], end); + exit(1); + } + + error("%s", strerror(errno)); exit(1); } env = packenv_create(packsize(pi)); |