~ubuntu-branches/debian/sid/rpm/sid

« back to all changes in this revision

Viewing changes to lib/header.c

  • Committer: Package Import Robot
  • Author(s): Michal Čihař
  • Date: 2013-06-06 11:39:34 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20130606113934-ela3du14fyba0t6u
Tags: 4.11.0.1-1
* New upstream release.
* Bump standards to 3.9.4.
* Refresh patches, update patch from Fedora.
* Build with Lua 5.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1406
1406
{
1407
1407
    indexEntry entry;
1408
1408
    rpm_data_t data;
1409
 
    int length;
 
1409
    int length = 0;
1410
1410
 
1411
1411
    /* Count must always be >= 1 for headerAddEntry. */
1412
1412
    if (td->count <= 0)
1417
1417
    if (hdrchkData(td->count))
1418
1418
        return 0;
1419
1419
 
1420
 
    length = 0;
1421
1420
    data = grabData(td->type, td->data, td->count, &length);
1422
 
    if (data == NULL || length <= 0)
 
1421
    if (data == NULL)
1423
1422
        return 0;
1424
1423
 
1425
1424
    /* Allocate more index space if necessary */
1639
1638
    indexEntry entry;
1640
1639
    rpm_data_t oldData;
1641
1640
    rpm_data_t data;
1642
 
    int length;
 
1641
    int length = 0;
1643
1642
 
1644
1643
    /* First find the tag */
1645
1644
    entry = findEntry(h, td->tag, td->type);
1646
1645
    if (!entry)
1647
1646
        return 0;
1648
1647
 
1649
 
    length = 0;
1650
1648
    data = grabData(td->type, td->data, td->count, &length);
1651
 
    if (data == NULL || length <= 0)
 
1649
    if (data == NULL)
1652
1650
        return 0;
1653
1651
 
1654
1652
    /* make sure entry points to the first occurence of this tag */