summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-07-06 23:28:33 -0400
committerTavian Barnes <tavianator@tavianator.com>2018-07-06 23:28:33 -0400
commit6cee5cbeaf8214f9b924bf79306672e1a52f18ef (patch)
tree8af6afb4681f9a3635b486ce6ff3a18956854395 /parse.c
parent7e0cafb70135a68066ff72227613df9eeb2512fb (diff)
downloadbfs-6cee5cbeaf8214f9b924bf79306672e1a52f18ef.tar.xz
parse: Add some missing failure messages
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 36c8399..89a47b7 100644
--- a/parse.c
+++ b/parse.c
@@ -406,6 +406,7 @@ static int expr_open(struct parser_state *state, struct expr *expr, const char *
struct open_file *ofile = malloc(sizeof(*ofile));
if (!ofile) {
+ perror("malloc()");
goto out_close;
}
@@ -3041,6 +3042,7 @@ struct cmdline *parse_cmdline(int argc, char *argv[]) {
cmdline->argv = malloc((argc + 1)*sizeof(*cmdline->argv));
if (!cmdline->argv) {
+ perror("malloc()");
goto fail;
}
for (int i = 0; i <= argc; ++i) {