Rearrange rpmdbInitIterator() a bit for clarity
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 13 Sep 2010 10:46:15 +0000 (13:46 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 13 Sep 2010 10:49:48 +0000 (13:49 +0300)
commit5573faf301bec875a7b2c9c706ebb2b15cfbde0a
treed24d4b3ad8fbf3023a28d9b47ab723aa939a2cbe
parent92c12d1a8ef11106df69b07ca357c560e07e9efd
Rearrange rpmdbInitIterator() a bit for clarity
- Avoid allocating the iterator until we know it's not an error.
  Doing the chaining earlier doesn't help anything here as the
  cursor used here wasn't linked to the mi at this point, and avoids
  having to free up partially initialized structure in case of errors.
- Group the mi initialization to make the actual initialization
  stand out from the (unnecessary) zeroing of the calloc()'ed struct.
lib/rpmdb.c