Eliminate some more unnecessary RAII_VAR() uses.

RAII_VAR() is not a hammer appropriate to pound all nails.
........

Merged revisions 412413 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2014-04-15 18:30:24 +00:00
parent 45ade68cb4
commit ba1db5d8f5
4 changed files with 14 additions and 19 deletions

View File

@@ -890,11 +890,10 @@ static void generate_or_link_lots_to_configs(void)
struct parking_lot_cfg *lot_cfg;
struct ao2_iterator iter;
for (iter = ao2_iterator_init(cfg->parking_lots, 0); (lot_cfg = ao2_iterator_next(&iter)); ao2_ref(lot_cfg, -1)) {
RAII_VAR(struct parking_lot *, lot, NULL, ao2_cleanup);
lot = parking_lot_build_or_update(lot_cfg, 0);
iter = ao2_iterator_init(cfg->parking_lots, 0);
for (; (lot_cfg = ao2_iterator_next(&iter)); ao2_ref(lot_cfg, -1)) {
ao2_cleanup(parking_lot_build_or_update(lot_cfg, 0));
}
ao2_iterator_destroy(&iter);
}