aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-09-27 02:43:35 +0000
committerMatt Kraai <kraai@debian.org>2000-09-27 02:43:35 +0000
commitbbaef66b3f99213f06adf04df6b3e5e61278d75b (patch)
tree3838db4158e8e05a753fffd6e87cbbc7946425ad /editors
parente0bcce09baff576b1b16b3ffe780b6d91c7710c2 (diff)
downloadbusybox-w32-bbaef66b3f99213f06adf04df6b3e5e61278d75b.tar.gz
busybox-w32-bbaef66b3f99213f06adf04df6b3e5e61278d75b.tar.bz2
busybox-w32-bbaef66b3f99213f06adf04df6b3e5e61278d75b.zip
Consolidate handling of some fopen failures.
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c
index cb3f1bbf1..75435f67a 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -472,9 +472,7 @@ static void load_cmd_file(char *filename)
472 char *line; 472 char *line;
473 char *nextline; 473 char *nextline;
474 474
475 cmdfile = fopen(filename, "r"); 475 cmdfile = xfopen(filename, "r");
476 if (cmdfile == NULL)
477 fatalError(strerror(errno));
478 476
479 while ((line = get_line_from_file(cmdfile)) != NULL) { 477 while ((line = get_line_from_file(cmdfile)) != NULL) {
480 /* if a line ends with '\' it needs the next line appended to it */ 478 /* if a line ends with '\' it needs the next line appended to it */