aboutsummaryrefslogtreecommitdiffstats
path: root/testsp.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-07-23 20:17:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-07-23 20:17:20 -0700
commit5d8b80236056e229105c158c5aca8ba34d73e468 (patch)
treec13d377b2db1de47b0b618f390c20f4d3cc24790 /testsp.c
parent06540c9cef675fd8665325301384f3cc491e9f66 (diff)
downloadsafepath-5d8b80236056e229105c158c5aca8ba34d73e468.tar.gz
safepath-5d8b80236056e229105c158c5aca8ba34d73e468.tar.bz2
safepath-5d8b80236056e229105c158c5aca8ba34d73e468.zip
Map safepath errors to strings.
* safepath.[ch]: New function, safepath_strerr. * testsp.c (main): Use new function to print message, rather than integer code.
Diffstat (limited to 'testsp.c')
-rw-r--r--testsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsp.c b/testsp.c
index 4691d31..1d9f396 100644
--- a/testsp.c
+++ b/testsp.c
@@ -37,7 +37,7 @@ int main(int argc, char **argv)
if (argv[0] && argv[1] && !argv[2]) {
int res = safepath_check(argv[1]);
- printf("safepath_check(\"%s\") == %d\n", argv[1], res);
+ printf("safepath_check(\"%s\") == %s\n", argv[1], safepath_strerr(res));
return res == SAFEPATH_OK ? 0 : EXIT_FAILURE;
} else if (argv[0]) {
printf("%s: requires exactly one argument\n", argv[0]);