diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-09-25 14:50:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-09-25 14:50:49 (GMT) |
commit | 12e30dc9b284cae8dd821ffec93c344b7fb0d96b (patch) | |
tree | ca1e34bd719276349c4f75a7c38d79d361ce2025 /src/H5MM.c | |
parent | f9c3920d286b9d18156d1b7d85f14852345b5e74 (diff) | |
download | hdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.zip hdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.tar.gz hdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.tar.bz2 |
[svn-r5947] Purpose:
Code cleanup
Description:
Clean up ID->name code:
- Reformat to better match library coding standard
- Changed several algorithms to be more efficient
- Integrated into library more smoothly
Platforms tested:
eirene w/FORTRAN & C++
arabica w/FORTRAN
modi4 w/FORTRAN & parallel
sleipnir
Diffstat (limited to 'src/H5MM.c')
-rw-r--r-- | src/H5MM.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -98,18 +98,20 @@ done: char * H5MM_xstrdup(const char *s) { - char *ret_value; + char *ret_value=NULL; /* Use FUNC_ENTER_NOINIT here to avoid performance issues */ FUNC_ENTER_NOINIT(H5MM_xstrdup); - if (!s) - HGOTO_DONE(NULL); - ret_value = H5MM_malloc(HDstrlen(s) + 1); - assert (ret_value); - HDstrcpy(ret_value, s); + if (s) { + ret_value = H5MM_malloc(HDstrlen(s) + 1); + assert (ret_value); + HDstrcpy(ret_value, s); + } /* end if */ +#ifdef LATER done: +#endif /* LATER */ FUNC_LEAVE(ret_value); } |