diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-09 11:42:18 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-09 11:42:18 +0300 |
commit | 43dfc9e8d01ad840a0420bcbf037244dfd300caa (patch) | |
tree | 44593c68ecd43ea0604aca85d3ea06c1d698c3e4 | |
parent | 8dd2babb562aff4db947becdeeba3fd2fa1cca12 (diff) | |
download | rpm-43dfc9e8d01ad840a0420bcbf037244dfd300caa.tar.gz rpm-43dfc9e8d01ad840a0420bcbf037244dfd300caa.tar.bz2 rpm-43dfc9e8d01ad840a0420bcbf037244dfd300caa.zip |
Eliminate unused pad calculations from header code
-rw-r--r-- | lib/header.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/header.c b/lib/header.c index 9602976eb..0a08cdae4 100644 --- a/lib/header.c +++ b/lib/header.c @@ -226,7 +226,6 @@ unsigned headerSizeof(Header h, enum hMagic magicp) { indexEntry entry; unsigned int size = 0; - unsigned int pad = 0; int i; if (h == NULL) @@ -266,7 +265,6 @@ unsigned headerSizeof(Header h, enum hMagic magicp) unsigned diff = typeSizes[type] - (size % typeSizes[type]); if (diff != typeSizes[type]) { size += diff; - pad += diff; } } @@ -450,7 +448,6 @@ static void * doHeaderUnload(Header h, entryInfo pe; char * dataStart; char * te; - unsigned pad; unsigned len; int32_t il = 0; int32_t dl = 0; @@ -464,7 +461,6 @@ static void * doHeaderUnload(Header h, headerUnsort(h); /* Compute (il,dl) for all tags, including those deleted in region. */ - pad = 0; drlen = ndribbles = driplen = ndrips = 0; for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) { if (ENTRY_IS_REGION(entry)) { @@ -489,7 +485,6 @@ static void * doHeaderUnload(Header h, unsigned diff = typeSizes[type] - (dl % typeSizes[type]); if (diff != typeSizes[type]) { drlen += diff; - pad += diff; dl += diff; } } @@ -514,7 +509,6 @@ static void * doHeaderUnload(Header h, unsigned diff = typeSizes[type] - (dl % typeSizes[type]); if (diff != typeSizes[type]) { driplen += diff; - pad += diff; dl += diff; } } @@ -538,7 +532,6 @@ static void * doHeaderUnload(Header h, pe = (entryInfo) &ei[2]; dataStart = te = (char *) (pe + il); - pad = 0; for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) { const char * src; unsigned char *t; @@ -623,7 +616,6 @@ static void * doHeaderUnload(Header h, if (diff != typeSizes[type]) { memset(te, 0, diff); te += diff; - pad += diff; } } |