From 98a3dd364739136329fe2b8f9cdeecf776fb17c9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 4 Oct 2020 13:46:35 -0400 Subject: diag: New bfs_perror() function --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exec.c') 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; } -- cgit v1.2.3