summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-09-22 14:30:37 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-09-22 14:30:37 +0300
commitea9ef92189517164cd68d80c2dd46d8c945ef6fc (patch)
tree5c4dd1e23e3e2e90a1e952337b06ff03fdcc4b1b /build/files.c
parentef539ed4dcf5afaf55a45d339ad29c0a930a832a (diff)
downloadlibrpm-tizen-ea9ef92189517164cd68d80c2dd46d8c945ef6fc.tar.gz
librpm-tizen-ea9ef92189517164cd68d80c2dd46d8c945ef6fc.tar.bz2
librpm-tizen-ea9ef92189517164cd68d80c2dd46d8c945ef6fc.zip
Kick out useless and ancient junk genCpioListAndHeader()
- scareMem is not used for anything here - xmalloc() + xcalloc() cannot return NULL, don't bother checking
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/build/files.c b/build/files.c
index 8c6603283..51070e911 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1168,29 +1168,24 @@ static void genCpioListAndHeader(FileList fl,
/* rpmfi only groks compressed filelists */
compressFilelist(h);
- { int scareMem = 0;
+ {
rpmts ts = NULL; /* XXX FIXME drill rpmts ts all the way down here */
- rpmfi fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ rpmfi fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, 0);
char * a, * d;
- if (fi == NULL) return; /* XXX can't happen */
-
fi->te = xcalloc(1, sizeof(*fi->te));
fi->te->type = TR_ADDED;
fi->dnl = _free(fi->dnl);
fi->bnl = _free(fi->bnl);
- if (!scareMem) fi->dil = _free(fi->dil);
+ fi->dil = _free(fi->dil);
fi->dnl = xmalloc(fi->fc * sizeof(*fi->dnl) + dpathlen + 1);
d = (char *)(fi->dnl + fi->fc);
*d = '\0';
fi->bnl = xmalloc(fi->fc * (sizeof(*fi->bnl) + sizeof(*fi->dil)));
-/* FIX: artifact of spoofing headerGetEntry */
- fi->dil = (!scareMem)
- ? xcalloc(sizeof(*fi->dil), fi->fc)
- : (int *)(fi->bnl + fi->fc);
+ fi->dil = xcalloc(sizeof(*fi->dil), fi->fc);
fi->apath = xmalloc(fi->fc * sizeof(*fi->apath) + apathlen + 1);
a = (char *)(fi->apath + fi->fc);
@@ -1207,7 +1202,6 @@ static void genCpioListAndHeader(FileList fl,
fi->fgroup = _free(fi->fgroup);
/* Make the cpio list */
- if (fi->dil != NULL) /* XXX can't happen */
for (i = 0, flp = fl->fileList; i < fi->fc; i++, flp++) {
char * b;