xcalloc() cannot return NULL, remove redundant check
This commit is contained in:
parent
06a2f1269b
commit
57b6b175ad
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue