diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-03 21:40:11 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-03 21:40:11 +0000 |
commit | 11d67a239fd6ae71c26755c4dce20bc07072d4e2 (patch) | |
tree | 4f4e270ab685b344ac93f134f514b1dfd5e10e16 | |
parent | 1a83e557578d766b8bfb26826f2f3682fd1be4a1 (diff) | |
download | busybox-w32-11d67a239fd6ae71c26755c4dce20bc07072d4e2.tar.gz busybox-w32-11d67a239fd6ae71c26755c4dce20bc07072d4e2.tar.bz2 busybox-w32-11d67a239fd6ae71c26755c4dce20bc07072d4e2.zip |
- 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
git-svn-id: svn://busybox.net/trunk/busybox@15278 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 6585a60bd..1b780d478 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -481,7 +481,7 @@ static void add_cmd(char *cmdstr) | |||
481 | cmdstr = bb_xasprintf("%s\n%s", bbg.add_cmd_line, cmdstr); | 481 | cmdstr = bb_xasprintf("%s\n%s", bbg.add_cmd_line, cmdstr); |
482 | free(bbg.add_cmd_line); | 482 | free(bbg.add_cmd_line); |
483 | bbg.add_cmd_line = cmdstr; | 483 | bbg.add_cmd_line = cmdstr; |
484 | } else bbg.add_cmd_line=NULL; | 484 | } else bbg.add_cmd_line=NULL; /* XXX: erm.. bbg.add_cmd_line was 0 and we set it to *0 here why? */ |
485 | 485 | ||
486 | /* If this line ends with backslash, request next line. */ | 486 | /* If this line ends with backslash, request next line. */ |
487 | temp=strlen(cmdstr); | 487 | temp=strlen(cmdstr); |
@@ -737,8 +737,8 @@ static int puts_maybe_newline(char *s, FILE *file, int missing_newline, int no_n | |||
737 | if(!no_newline) fputc('\n',file); | 737 | if(!no_newline) fputc('\n',file); |
738 | 738 | ||
739 | if(ferror(file)) { | 739 | if(ferror(file)) { |
740 | fprintf(stderr,"Write failed.\n"); | 740 | bb_default_error_retval = 4; /* It's what gnu sed exits with... */ |
741 | exit(4); /* It's what gnu sed exits with... */ | 741 | bb_error_msg_and_die(bb_msg_write_error); |
742 | } | 742 | } |
743 | 743 | ||
744 | return no_newline; | 744 | return no_newline; |