diff options
-rw-r--r-- | editors/awk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/awk.c b/editors/awk.c index b3871ffc5..df9b7fdc9 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -3609,8 +3609,6 @@ static var *evaluate(node *op, var *res) | |||
3609 | #undef sreg | 3609 | #undef sreg |
3610 | } | 3610 | } |
3611 | 3611 | ||
3612 | /* -------- main & co. -------- */ | ||
3613 | |||
3614 | static int awk_exit(void) | 3612 | static int awk_exit(void) |
3615 | { | 3613 | { |
3616 | unsigned i; | 3614 | unsigned i; |
@@ -3717,6 +3715,8 @@ int awk_main(int argc UNUSED_PARAM, char **argv) | |||
3717 | g_progname = llist_pop(&list_f); | 3715 | g_progname = llist_pop(&list_f); |
3718 | fd = xopen_stdin(g_progname); | 3716 | fd = xopen_stdin(g_progname); |
3719 | s = xmalloc_read(fd, NULL); /* it's NUL-terminated */ | 3717 | s = xmalloc_read(fd, NULL); /* it's NUL-terminated */ |
3718 | if (!s) | ||
3719 | bb_perror_msg_and_die("read error from '%s'", g_progname); | ||
3720 | close(fd); | 3720 | close(fd); |
3721 | parse_program(s); | 3721 | parse_program(s); |
3722 | free(s); | 3722 | free(s); |