diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-07-23 20:17:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-07-23 20:17:20 -0700 |
commit | 5d8b80236056e229105c158c5aca8ba34d73e468 (patch) | |
tree | c13d377b2db1de47b0b618f390c20f4d3cc24790 /testsp.c | |
parent | 06540c9cef675fd8665325301384f3cc491e9f66 (diff) | |
download | safepath-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]); |