diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-12-17 22:21:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-12-17 22:21:08 (GMT) |
commit | 1bc07c6aaeadd03d73216af25db0cb46db2391e0 (patch) | |
tree | 79cfb25eaad5e610b1c10f9a21b27ec9c07685b0 /src/H5T.c | |
parent | df2fef9759940bf5d80e8aa5a8dcd1251d58d490 (diff) | |
parent | 77038a81755bd6c853323ba261c9c671800d7be7 (diff) | |
download | hdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.zip hdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.tar.gz hdf5-1bc07c6aaeadd03d73216af25db0cb46db2391e0.tar.bz2 |
[svn-r18031] Description:
Bring r18030 from merge_metadata_journaling branch to trunk:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
Also, some other minor cleanups along the way.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -2367,7 +2367,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, } /* end if */ H5T_close(old_path->src); H5T_close(old_path->dst); - H5FL_FREE(H5T_path_t,old_path); + old_path = H5FL_FREE(H5T_path_t, old_path); /* Release temporary atoms */ H5I_dec_ref(tmp_sid, FALSE); @@ -2380,17 +2380,17 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, } /* end else */ done: - if (ret_value<0) { - if (new_path) { - if (new_path->src) + if(ret_value < 0) { + if(new_path) { + if(new_path->src) H5T_close(new_path->src); - if (new_path->dst) + if(new_path->dst) H5T_close(new_path->dst); - H5FL_FREE(H5T_path_t,new_path); + new_path = H5FL_FREE(H5T_path_t, new_path); } /* end if */ - if (tmp_sid>=0) + if(tmp_sid >= 0) H5I_dec_ref(tmp_sid, FALSE); - if (tmp_did>=0) + if(tmp_did >= 0) H5I_dec_ref(tmp_did, FALSE); } /* end if */ @@ -2541,7 +2541,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, } H5T_close(path->src); H5T_close(path->dst); - H5FL_FREE(H5T_path_t,path); + path = H5FL_FREE(H5T_path_t, path); H5E_clear_stack(NULL); /*ignore all shutdown errors*/ } /* end else */ } /* end for */ @@ -2862,7 +2862,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) FUNC_ENTER_NOAPI_NOINIT(H5T_encode) /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc((size_t)0))) + if(NULL == (f = H5F_fake_alloc((uint8_t)0))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") /* Find out the size of buffer needed */ @@ -2918,7 +2918,7 @@ H5T_decode(const unsigned char *buf) FUNC_ENTER_NOAPI_NOINIT(H5T_decode) /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc((size_t)0))) + if(NULL == (f = H5F_fake_alloc((uint8_t)0))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode the type of the information */ @@ -3041,8 +3041,8 @@ H5T_create(H5T_class_t type, size_t size) done: if(NULL == ret_value) { if(dt) { - H5FL_FREE(H5T_shared_t, dt->shared); - H5FL_FREE(H5T_t,dt); + dt->shared = H5FL_FREE(H5T_shared_t, dt->shared); + dt = H5FL_FREE(H5T_t, dt); } /* end if */ } /* end if */ @@ -3331,8 +3331,8 @@ done: if(ret_value == NULL) { if(new_dt) { if(new_dt->shared) - H5FL_FREE(H5T_shared_t, new_dt->shared); - H5FL_FREE(H5T_t, new_dt); + new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared); + new_dt = H5FL_FREE(H5T_t, new_dt); } /* end if */ } /* end if */ @@ -3425,8 +3425,8 @@ done: if(ret_value == NULL) if(dt) { if(dt->shared) - H5FL_FREE(H5T_shared_t, dt->shared); - H5FL_FREE(H5T_t, dt); + dt->shared = H5FL_FREE(H5T_shared_t, dt->shared); + dt = H5FL_FREE(H5T_t, dt); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -3562,7 +3562,7 @@ H5T_close(H5T_t *dt) if(H5T_free(dt) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype"); - H5FL_FREE(H5T_shared_t, dt->shared); + dt->shared = H5FL_FREE(H5T_shared_t, dt->shared); } else { /* * If a named type is being closed then close the object header and @@ -3588,7 +3588,7 @@ H5T_close(H5T_t *dt) } /* end else */ /* Free the datatype struct */ - H5FL_FREE(H5T_t,dt); + dt = H5FL_FREE(H5T_t, dt); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4482,7 +4482,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, H5T_close(table->src); if(table->dst) H5T_close(table->dst); - H5FL_FREE(H5T_path_t, table); + table = H5FL_FREE(H5T_path_t, table); table = path; H5T_g.path[md] = path; } else if(path != table) { @@ -4518,7 +4518,7 @@ done: H5T_close(path->src); if(path->dst) H5T_close(path->dst); - H5FL_FREE(H5T_path_t, path); + path = H5FL_FREE(H5T_path_t, path); } /* end if */ if(src_id >= 0) H5I_dec_ref(src_id, FALSE); |