diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-05-15 02:06:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-05-15 02:06:09 (GMT) |
commit | 5c437fa51fa9dde519316b4597cd0b6e8e2caf3d (patch) | |
tree | d81319978ae5b094b7e2df9e12de1c9b21d2db5b | |
parent | 8fd9d6b53f44b12204ea2bcd34eeedd3f3d54603 (diff) | |
download | hdf5-5c437fa51fa9dde519316b4597cd0b6e8e2caf3d.zip hdf5-5c437fa51fa9dde519316b4597cd0b6e8e2caf3d.tar.gz hdf5-5c437fa51fa9dde519316b4597cd0b6e8e2caf3d.tar.bz2 |
[svn-r27079] Description:
Clean up H5G interface, to align w/v3 metadata cache changes
Tested on:
MacOSX/64 10.10.3 (amazon) w/serial & parallel
Linux/32 2.6.* (jam) w/serial & parallel
-rw-r--r-- | src/H5Gcache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Gcache.c b/src/H5Gcache.c index 15dbf65..d1923a6 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -145,10 +145,10 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) /* Allocate symbol table data structures */ if(NULL == (sym = H5FL_CALLOC(H5G_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - sym->node_size = H5G_NODE_SIZE(f); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + sym->node_size = (size_t)(H5G_NODE_SIZE(f)); if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Wrap the local buffer for serialized node info */ if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf)))) @@ -167,12 +167,12 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) /* magic */ if(HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature") - p += 4; + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature") + p += H5_SIZEOF_MAGIC; /* version */ if(H5G_NODE_VERS != *p++) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version") /* reserved */ p++; @@ -182,7 +182,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) /* entries */ if(H5G__ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries") /* Set return value */ ret_value = sym; @@ -248,7 +248,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_ /* magic number */ HDmemcpy(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += 4; + p += H5_SIZEOF_MAGIC; /* version number */ *p++ = H5G_NODE_VERS; |