summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-01-28 17:23:16 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-01-28 17:23:16 +0200
commit57b6b175adf4c6fd4737c72142b6d8d220a17622 (patch)
treed207457efea1f2c0ff8e6053e4632ecd7ef02cd8
parent06a2f1269b035a3a76464149834f2a5a8c4e89f2 (diff)
downloadlibrpm-tizen-57b6b175adf4c6fd4737c72142b6d8d220a17622.tar.gz
librpm-tizen-57b6b175adf4c6fd4737c72142b6d8d220a17622.tar.bz2
librpm-tizen-57b6b175adf4c6fd4737c72142b6d8d220a17622.zip
xcalloc() cannot return NULL, remove redundant check
-rw-r--r--lib/rpmfi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index ae5643c82..3abd60ebd 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -1121,7 +1121,7 @@ static scidx_t *cacheTag(strcache cache, Header h, rpmTag tag)
rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags)
{
- rpmfi fi = NULL;
+ rpmfi fi = xcalloc(1, sizeof(*fi));
unsigned char * t;
struct rpmtd_s fdigests, digalgo;
struct rpmtd_s td;
@@ -1129,10 +1129,6 @@ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags)
HEADERGET_MINMEM : HEADERGET_ALLOC;
headerGetFlags defFlags = HEADERGET_ALLOC;
- fi = xcalloc(1, sizeof(*fi));
- if (fi == NULL) /* XXX can't happen */
- goto exit;
-
fi->magic = RPMFIMAGIC;
fi->i = -1;