← Commit list

f3ac9ebc8

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-05-31
SOURCE BUG Duration: 35s

Subject

- convert xcalloc(1,x) to xzalloc

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 →

libbb/dump.c+3 -3
@@ -98,7 +98,7 @@ static void rewrite(FS * fs)
for (nconv = 0, fmtp = fu->fmt; *fmtp; nextpr = &pr->nextpr) {
/* NOSTRICT */
/* DBU:[[email protected]] calloc so that forward ptrs start out NULL*/
- pr = (PR *) xcalloc(1,sizeof(PR));
+ pr = (PR *) xzalloc(sizeof(PR));
if (!fu->nextpr)
fu->nextpr = pr;
/* ignore nextpr -- its unused inside the loop and is
@@ -683,7 +683,7 @@ void bb_dump_add(const char *fmt)
/* start new linked list of format units */
/* NOSTRICT */
- tfs = (FS *) xcalloc(1,sizeof(FS)); /*DBU:[[email protected]] start out NULL */
+ tfs = (FS *) xzalloc(sizeof(FS)); /*DBU:[[email protected]] start out NULL */
if (!bb_dump_fshead) {
bb_dump_fshead = tfs;
} else {
@@ -703,7 +703,7 @@ void bb_dump_add(const char *fmt)
/* allocate a new format unit and link it in */
/* NOSTRICT */
/* DBU:[[email protected]] calloc so that forward pointers start out NULL */
- tfu = (FU *) xcalloc(1,sizeof(FU));
+ tfu = (FU *) xzalloc(sizeof(FU));
*nextfu = tfu;
nextfu = &tfu->nextfu;
tfu->reps = 1;