diff options
author | Bernhard Reutner-Fischer | 2006-06-03 21:40:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-06-03 21:40:11 +0000 |
commit | a3d4bf38b0245cdf3551d59ca1a73bceb01abc0f (patch) | |
tree | 4f4e270ab685b344ac93f134f514b1dfd5e10e16 /editors | |
parent | e84f4343b2212ec2ff9d87521ebd1d30576cdff3 (diff) | |
download | busybox-a3d4bf38b0245cdf3551d59ca1a73bceb01abc0f.zip busybox-a3d4bf38b0245cdf3551d59ca1a73bceb01abc0f.tar.gz |
- use bb functions instead of handrolling stuff.
- add XXX question about supposedly superfluous else clause
text data bss dec hex filename
5918 0 0 5918 171e editors/sed.o.orig
5901 0 0 5901 170d editors/sed.o
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c index 6585a60..1b780d4 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -481,7 +481,7 @@ static void add_cmd(char *cmdstr) cmdstr = bb_xasprintf("%s\n%s", bbg.add_cmd_line, cmdstr); free(bbg.add_cmd_line); bbg.add_cmd_line = cmdstr; - } else bbg.add_cmd_line=NULL; + } else bbg.add_cmd_line=NULL; /* XXX: erm.. bbg.add_cmd_line was 0 and we set it to *0 here why? */ /* If this line ends with backslash, request next line. */ temp=strlen(cmdstr); @@ -737,8 +737,8 @@ static int puts_maybe_newline(char *s, FILE *file, int missing_newline, int no_n if(!no_newline) fputc('\n',file); if(ferror(file)) { - fprintf(stderr,"Write failed.\n"); - exit(4); /* It's what gnu sed exits with... */ + bb_default_error_retval = 4; /* It's what gnu sed exits with... */ + bb_error_msg_and_die(bb_msg_write_error); } return no_newline; |