diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-10-04 13:46:35 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-10-05 15:39:22 -0400 |
commit | 98a3dd364739136329fe2b8f9cdeecf776fb17c9 (patch) | |
tree | d571ed17227849679b397e0cfd6c95a51c41c524 /exec.c | |
parent | b3312002a5d96cd486156a711d3c1861c150b7c6 (diff) | |
download | bfs-98a3dd364739136329fe2b8f9cdeecf776fb17c9.tar.xz |
diag: New bfs_perror() function
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |