summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-07-28 19:37:35 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-07-28 19:37:35 (GMT)
commit2681ce4a86ca3c6400ba242bc336d23c77753ff5 (patch)
treef4cb88dcd07675a7a4c76141a080148cee1eabc7 /src/H5O.c
parente4834c43ce6528308ebd5375bd4c7a0df88af427 (diff)
downloadhdf5-2681ce4a86ca3c6400ba242bc336d23c77753ff5.zip
hdf5-2681ce4a86ca3c6400ba242bc336d23c77753ff5.tar.gz
hdf5-2681ce4a86ca3c6400ba242bc336d23c77753ff5.tar.bz2
[svn-r1549] Changes since 19990728
---------------------- ./src/H5B.c [1.3] ./src/H5D.c [1.3] ./src/H5F.c [1.3] ./src/H5Farray.c [1.3] ./src/H5Fcore.c [1.3] ./src/H5Ffamily.c [1.3] ./src/H5Fistore.c [1.3] ./src/H5Flow.c [1.3] ./src/H5Fmpio.c [1.3] ./src/H5Fprivate.h [1.3] ./src/H5Fsplit.c [1.3] ./src/H5Fstdio.c [1.3] ./src/H5G.c [1.3] ./src/H5HG.c [1.3] ./src/H5HL.c [1.3] ./src/H5MF.c [1.3] ./src/H5O.c [1.3] ./src/H5Odtype.c [1.3] ./src/H5Oefl.c [1.3] ./src/H5P.c [1.3] ./src/H5Smpio.c [1.3] ./src/H5T.c [1.3] ./src/H5detect.c [1.3] ./tools/h5debug.c [1.3] Some of the H5F_addr_* functions were optimized away. ./src/H5D.c [1.3] Fixed the return values from NULL to FAIL on one MPI-IO function.
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/H5O.c b/src/H5O.c
index e65221e..9130993 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -169,8 +169,7 @@ H5O_create(H5F_t *f, size_t size_hint, H5G_entry_t *ent/*out*/)
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
- tmp_addr = ent->header;
- H5F_addr_inc(&tmp_addr, (hsize_t)H5O_SIZEOF_HDR(f));
+ tmp_addr = ent->header + (hsize_t)H5O_SIZEOF_HDR(f);
oh->chunk[0].dirty = TRUE;
oh->chunk[0].addr = tmp_addr;
oh->chunk[0].size = size_hint;
@@ -376,8 +375,7 @@ H5O_load(H5F_t *f, haddr_t addr, const void UNUSED *_udata1,
UINT32DECODE(p, oh->nlink);
/* decode first chunk info */
- chunk_addr = addr;
- H5F_addr_inc(&chunk_addr, (hsize_t)H5O_SIZEOF_HDR(f));
+ chunk_addr = addr + (hsize_t)H5O_SIZEOF_HDR(f);
UINT32DECODE(p, chunk_size);
/* build the message array */
@@ -460,7 +458,7 @@ H5O_load(H5F_t *f, haddr_t addr, const void UNUSED *_udata1,
assert(p == oh->chunk[chunkno].image + chunk_size);
/* decode next object header continuation message */
- for (H5F_addr_undef(&chunk_addr);
+ for (chunk_addr=H5F_ADDR_UNDEF;
!H5F_addr_defined(chunk_addr) && curmesg < oh->nmesgs;
curmesg++) {
if (H5O_CONT_ID == oh->mesg[curmesg].type->id) {
@@ -1790,7 +1788,7 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size)
}
chunkno = oh->nchunks++;
oh->chunk[chunkno].dirty = TRUE;
- H5F_addr_undef(&(oh->chunk[chunkno].addr));
+ oh->chunk[chunkno].addr = H5F_ADDR_UNDEF;
oh->chunk[chunkno].size = size;
if (NULL==(oh->chunk[chunkno].image = p = H5MM_calloc(size))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
@@ -1873,7 +1871,7 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size)
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
- H5F_addr_undef(&(cont->addr));
+ cont->addr = H5F_ADDR_UNDEF;
cont->size = 0;
cont->chunkno = chunkno;
oh->mesg[found_null].native = cont;
@@ -2125,8 +2123,7 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, intn indent, intn fwidth)
HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
"Address:", oh->chunk[i].addr);
- tmp_addr = addr;
- H5F_addr_inc(&tmp_addr, (hsize_t)H5O_SIZEOF_HDR(f));
+ tmp_addr = addr + (hsize_t)H5O_SIZEOF_HDR(f);
if (0 == i && H5F_addr_ne(oh->chunk[i].addr, tmp_addr)) {
HDfprintf(stream, "*** WRONG ADDRESS!\n");
}