diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-10-04 13:04:47 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-10-04 13:04:47 -0400 |
commit | f39733d053528ca234f955401ef8d8ecd84762a4 (patch) | |
tree | 8037db5aa1fcb3cc15022067cefabe993ba8c408 /parse.c | |
parent | a4bf5aabe7ffd2a3702f6faf6a560686b308d807 (diff) |
parse: Report errors when failing to add a root
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -377,7 +377,11 @@ static char **parser_advance(struct parser_state *state, enum token_type type, s */ static int parse_root(struct parser_state *state, const char *path) { struct bfs_ctx *ctx = state->ctx; - return DARRAY_PUSH(&ctx->paths, &path); + int ret = DARRAY_PUSH(&ctx->paths, &path); + if (ret != 0) { + perror("DARRAY_PUSH()"); + } + return ret; } /** |