diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-26 15:02:33 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-28 10:20:38 +0300 |
commit | 64b573d16682e61b134e287d74a18b22a669419b (patch) | |
tree | faab8525c71c7ccaa94de846b7dcfcf9f3bea9a2 /lib | |
parent | 46409035b658d22baa01456a227ee9839d06a1da (diff) | |
download | rpm-64b573d16682e61b134e287d74a18b22a669419b.tar.gz rpm-64b573d16682e61b134e287d74a18b22a669419b.tar.bz2 rpm-64b573d16682e61b134e287d74a18b22a669419b.zip |
Eliminate pointless alloca() of struct fileIndexEntry struct
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpmal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c index f64bb0417..8c7334308 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -585,14 +585,14 @@ rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds, rpmalKey * keyp) const char * baseName; struct dirInfo_s dieNeedle; dirInfo die; - fileIndexEntry fieNeedle = - memset(alloca(sizeof(*fieNeedle)), 0, sizeof(*fieNeedle)); + struct fileIndexEntry_s fieNeedle; fileIndexEntry fie; availablePackage alp; fnpyKey * ret = NULL; const char * fileName; memset(&dieNeedle, 0, sizeof(dieNeedle)); + memset(&fieNeedle, 0, sizeof(fieNeedle)); if (keyp) *keyp = RPMAL_NOMATCH; @@ -635,10 +635,10 @@ rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds, rpmalKey * keyp) if (_rpmal_debug) fprintf(stderr, "==> die %p %s\n", die, (die->dirName ? die->dirName : "(nil)")); - fieNeedle->baseName = baseName; - fieNeedle->baseNameLen = strlen(fieNeedle->baseName); - fie = bsearch(fieNeedle, die->files, die->numFiles, - sizeof(*fieNeedle), fieCompare); + fieNeedle.baseName = baseName; + fieNeedle.baseNameLen = strlen(fieNeedle.baseName); + fie = bsearch(&fieNeedle, die->files, die->numFiles, + sizeof(fieNeedle), fieCompare); if (fie == NULL) continue; /* XXX shouldn't happen */ |