aboutsummaryrefslogtreecommitdiff
path: root/db2/db
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
parent88c9111883a14f2f3fd31471df6923f76b97e1a0 (diff)
downloadglibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.zip
glibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.tar.gz
glibc-2c874db2dd8b34a36f00284c2c5d215a4c9506ac.tar.bz2
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')
-rw-r--r--db2/db/db.c6
-rw-r--r--db2/db/db_rec.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/db2/db/db.c b/db2/db/db.c
index 755b34b..70c6c54 100644
--- a/db2/db/db.c
+++ b/db2/db/db.c
@@ -265,7 +265,7 @@ db_open(fname, type, flags, mode, dbenv, dbinfo, dbpp)
retry_cnt = 0;
open_retry: if (LF_ISSET(DB_CREATE)) {
if ((ret = __db_open(real_name, flags | DB_EXCL,
- OKFLAGS | DB_EXCL, mode, &fd)) != 0)
+ OKFLAGS | DB_EXCL, mode, &fd)) != 0) {
if (ret == EEXIST) {
LF_CLR(DB_CREATE);
goto open_retry;
@@ -274,6 +274,7 @@ open_retry: if (LF_ISSET(DB_CREATE)) {
"%s: %s", fname, strerror(ret));
goto err;
}
+ }
} else
if ((ret = __db_open(real_name,
flags, OKFLAGS, mode, &fd)) != 0) {
@@ -551,7 +552,7 @@ empty: /*
* Store the file id in the locker structure -- we can get it from
* there as necessary, and it saves having two copies.
*/
- if (need_fileid)
+ if (need_fileid) {
if (fname == NULL) {
memset(dbp->lock.fileid, 0, DB_FILE_ID_LEN);
if (F_ISSET(dbp, DB_AM_LOCKING) &&
@@ -562,6 +563,7 @@ empty: /*
if ((ret = __db_fileid(dbenv,
real_name, 1, dbp->lock.fileid)) != 0)
goto err;
+ }
/* No further use for the real name. */
if (real_name != NULL)
diff --git a/db2/db/db_rec.c b/db2/db/db_rec.c
index fe7c807..1ef6f18 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));