]> git.sur5r.net Git - openldap/commitdiff
MDB_DEBUG tweak for old compilers
authorHoward Chu <hyc@symas.com>
Thu, 25 Oct 2012 12:28:55 +0000 (05:28 -0700)
committerHoward Chu <hyc@symas.com>
Thu, 25 Oct 2012 12:28:55 +0000 (05:28 -0700)
libraries/libmdb/mdb.c

index 091e8ec569d0a0512bb5ca5fb82a889db958ca77..fddcc9e12ff55c69a762e253c29b801ce5a062fb 100644 (file)
@@ -3683,15 +3683,16 @@ static void
 mdb_cursor_pop(MDB_cursor *mc)
 {
        if (mc->mc_snum) {
-#if MDB_DEBUG
-               MDB_page        *top = mc->mc_pg[mc->mc_top];
-#endif
                mc->mc_snum--;
                if (mc->mc_snum)
                        mc->mc_top--;
-
+#if MDB_DEBUG
+               {
+               MDB_page        *top = mc->mc_pg[mc->mc_top];
                DPRINTF("popped page %zu off db %u cursor %p", top->mp_pgno,
                        mc->mc_dbi, (void *) mc);
+               }
+#endif
        }
 }