about summary refs log tree commit diff
path: root/db2/db/db_rec.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-07 11:07:34 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-07 11:07:34 +0000
commit2c874db2dd8b34a36f00284c2c5d215a4c9506ac (patch)
tree679922799ac611eeff4513bfb7b0f880f1277b4f /db2/db/db_rec.c
parent88c9111883a14f2f3fd31471df6923f76b97e1a0 (diff)
downloadglibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.tar.gz
glibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.tar.xz
glibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.zip
Update.
	* db2/btree/bt_cursor.c: Likewise.
	* db2/common/db_region.db_c: Likewise.
	* db2/common/db_salloc.db_c: Likewise.
	* db2/db/db.c: Likewise.
	* db2/db/db_rec.c: Likewise.
	* db2/hash/hash.c: Likewise.
	* db2/hash/hash_page.c: Likewise.
	* db2/hash/hash_rec.c: Likewise.
	* db2/log/log_findckp.c: Likewise.
	* db2/log/log_get.c: Likewise.
	* db2/log/log_put.c: Likewise.
	* db2/mp/mp_fget.c: Likewise.
	* db2/mp/mp_fput.c: Likewise.
	* db2/mp/mp_region.c: Likewise.
Diffstat (limited to 'db2/db/db_rec.c')
-rw-r--r--db2/db/db_rec.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/db2/db/db_rec.c b/db2/db/db_rec.c
index fe7c807384..1ef6f18e61 100644
--- a/db2/db/db_rec.c
+++ b/db2/db/db_rec.c
@@ -89,11 +89,12 @@ __db_addrem_recover(logp, dbtp, lsnp, redo, info)
 		change = DB_MPOOL_DIRTY;
 	}
 
-	if (change)
+	if (change) {
 		if (redo)
 			LSN(pagep) = *lsnp;
 		else
 			LSN(pagep) = argp->pagelsn;
+	}
 
 	if ((ret = memp_fput(mpf, pagep, change)) == 0)
 		*lsnp = argp->prev_lsn;
@@ -249,7 +250,7 @@ __db_big_recover(logp, dbtp, lsnp, redo, info)
 	/* Now check the previous page. */
 ppage:	if (argp->prev_pgno != PGNO_INVALID) {
 		change = 0;
-		if ((ret = memp_fget(mpf, &argp->prev_pgno, 0, &pagep)) != 0)
+		if ((ret = memp_fget(mpf, &argp->prev_pgno, 0, &pagep)) != 0) {
 			if (!redo) {
 				/*
 				 * We are undoing and the page doesn't exist.
@@ -264,6 +265,7 @@ ppage:	if (argp->prev_pgno != PGNO_INVALID) {
 				if ((ret = memp_fget(mpf, &argp->prev_pgno,
 				    DB_MPOOL_CREATE, &pagep)) != 0)
 					goto out;
+		}
 
 		cmp_n = log_compare(lsnp, &LSN(pagep));
 		cmp_p = log_compare(&LSN(pagep), &argp->prevlsn);
@@ -289,7 +291,7 @@ ppage:	if (argp->prev_pgno != PGNO_INVALID) {
 	/* Now check the next page.  Can only be set on a delete. */
 npage:	if (argp->next_pgno != PGNO_INVALID) {
 		change = 0;
-		if ((ret = memp_fget(mpf, &argp->next_pgno, 0, &pagep)) != 0)
+		if ((ret = memp_fget(mpf, &argp->next_pgno, 0, &pagep)) != 0) {
 			if (!redo) {
 				/*
 				 * We are undoing and the page doesn't exist.
@@ -304,6 +306,7 @@ npage:	if (argp->next_pgno != PGNO_INVALID) {
 				if ((ret = memp_fget(mpf, &argp->next_pgno,
 				    DB_MPOOL_CREATE, &pagep)) != 0)
 					goto out;
+		}
 
 		cmp_n = log_compare(lsnp, &LSN(pagep));
 		cmp_p = log_compare(&LSN(pagep), &argp->nextlsn);
@@ -530,7 +533,7 @@ __db_addpage_recover(logp, dbtp, lsnp, redo, info)
 	if ((ret = memp_fput(mpf, pagep, change)) != 0)
 		goto out;
 
-	if ((ret = memp_fget(mpf, &argp->nextpgno, 0, &pagep)) != 0)
+	if ((ret = memp_fget(mpf, &argp->nextpgno, 0, &pagep)) != 0) {
 		if (!redo) {
 			/*
 			 * We are undoing and the page doesn't exist.  That
@@ -544,6 +547,7 @@ __db_addpage_recover(logp, dbtp, lsnp, redo, info)
 			if ((ret = memp_fget(mpf,
 			    &argp->nextpgno, DB_MPOOL_CREATE, &pagep)) != 0)
 				goto out;
+	}
 
 	change = 0;
 	cmp_n = log_compare(lsnp, &LSN(pagep));