← Commit list

a3d4bf38b

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-06-03
SOURCE BUG Duration: 41s

Subject

- 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

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+3 -3
@@ -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;