]> git.sur5r.net Git - openldap/commitdiff
Cleanup a while() loop.
authorHoward Chu <hyc@openldap.org>
Tue, 27 Nov 2001 22:10:01 +0000 (22:10 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 27 Nov 2001 22:10:01 +0000 (22:10 +0000)
servers/slapd/back-bdb/nextid.c

index 5f2b6e30a5cc9a95eb4491244b50c6793dd7a9b5..6cf6ea5c0d101770c8762b8122f0b9866e95f916 100644 (file)
@@ -43,12 +43,9 @@ int bdb_last_id( BackendDB *be, DB_TXN *tid )
        rc = bdb->bi_id2entry->bdi_db->cursor( bdb->bi_id2entry->bdi_db,
                tid, &cursor, 0 );
 
-       while (rc == 0) {
+       if (rc == 0) {
                rc = cursor->c_get(cursor, &key, &data, DB_LAST);
                cursor->c_close(cursor);
-               if (rc != 0)
-                       break;
-               break;
        }
 
        switch(rc) {