summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-10-04 13:46:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-10-05 15:39:22 -0400
commit98a3dd364739136329fe2b8f9cdeecf776fb17c9 (patch)
treed571ed17227849679b397e0cfd6c95a51c41c524 /exec.c
parentb3312002a5d96cd486156a711d3c1861c150b7c6 (diff)
downloadbfs-98a3dd364739136329fe2b8f9cdeecf776fb17c9.tar.xz
diag: New bfs_perror() function
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index 723f1dc..3c9c6a5 100644
--- a/exec.c
+++ b/exec.c
@@ -120,7 +120,7 @@ static size_t bfs_exec_arg_max(const struct bfs_exec *execbuf) {
struct bfs_exec *parse_bfs_exec(char **argv, enum bfs_exec_flags flags, const struct bfs_ctx *ctx) {
struct bfs_exec *execbuf = malloc(sizeof(*execbuf));
if (!execbuf) {
- perror("malloc()");
+ bfs_perror(ctx, "malloc()");
goto fail;
}
@@ -167,7 +167,7 @@ struct bfs_exec *parse_bfs_exec(char **argv, enum bfs_exec_flags flags, const st
execbuf->argv_cap = execbuf->tmpl_argc + 1;
execbuf->argv = malloc(execbuf->argv_cap*sizeof(*execbuf->argv));
if (!execbuf->argv) {
- perror("malloc()");
+ bfs_perror(ctx, "malloc()");
goto fail;
}