diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-05-29 13:10:42 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-05-29 13:10:42 +0300 |
commit | 6bd2b43e9c90637380169992f48e278824139987 (patch) | |
tree | 8d17960a5dcf0fb03f7651d82707508a6bce2347 /lib/header.c | |
parent | a636095bedbe7b911a86f7ad60a99d418b7a3b89 (diff) | |
download | librpm-tizen-6bd2b43e9c90637380169992f48e278824139987.tar.gz librpm-tizen-6bd2b43e9c90637380169992f48e278824139987.tar.bz2 librpm-tizen-6bd2b43e9c90637380169992f48e278824139987.zip |
A few more dead NULL-assignment eliminations in low-level header code
Diffstat (limited to 'lib/header.c')
-rw-r--r-- | lib/header.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/header.c b/lib/header.c index a138c9ff4..bc6d15427 100644 --- a/lib/header.c +++ b/lib/header.c @@ -762,7 +762,7 @@ int headerDel(Header h, rpmTagVal tag) first->length = 0; if (ENTRY_IN_REGION(first)) continue; - data = _free(data); + free(data); } ne = (first - entry); @@ -935,14 +935,13 @@ Header headerCopyLoad(const void * uh) int32_t dl = ntohl(ei[1]); /* data length */ size_t pvlen = sizeof(il) + sizeof(dl) + (il * sizeof(struct entryInfo_s)) + dl; - void * nuh = NULL; Header h = NULL; /* Sanity checks on header intro. */ if (!(hdrchkTags(il) || hdrchkData(dl)) && pvlen < headerMaxbytes) { - nuh = memcpy(xmalloc(pvlen), uh, pvlen); + void * nuh = memcpy(xmalloc(pvlen), uh, pvlen); if ((h = headerLoad(nuh)) == NULL) - nuh = _free(nuh); + free(nuh); } return h; } @@ -1658,7 +1657,7 @@ int headerMod(Header h, rpmtd td) if (ENTRY_IN_REGION(entry)) { entry->info.offset = 0; } else - oldData = _free(oldData); + free(oldData); return 1; } |