diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-09-12 06:02:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-09-12 06:02:55 (GMT) |
commit | 5ffde305cdf2c167234f1ffb38adf557380f2234 (patch) | |
tree | f211c5a72d7332885ab83eca1270bcb131e1c6c9 /src/H5Omtime.c | |
parent | 966f5f42368663fb589807ae28b2887b98ed8067 (diff) | |
download | hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.zip hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.gz hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.bz2 |
[svn-r11384] Purpose:
Code cleanup
Description:
Merge back changes from "compact group" work that improve the
infrastructure of the library and may impact others. In this round of
merging, that includes:
- Move datatype allocation into single internal routine, instead of
duplicated code that was spread out in a dozen or so places.
- Clean up guts of object header routines (H5O_*) to allow for some of
the fancieroperations that need to be performed on groups, along with
some general improvements.
- Added a new error code
- Some minor cleanups in other code....
Platforms tested:
FreeBSD 4.11 (sleipnir)
Linux 2.4
Mac OS X
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r-- | src/H5Omtime.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c index c113676..d3c2f3c 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -114,9 +114,8 @@ static void * H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *sh) { - time_t *mesg, the_time; + time_t *mesg; uint32_t tmp_time; /* Temporary copy of the time */ - int version; /* Version of mtime information */ void *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_new_decode); @@ -127,8 +126,7 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p, assert (!sh); /* decode */ - version = *p++; - if(version!=H5O_MTIME_VERSION) + if(*p++ != H5O_MTIME_VERSION) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for mtime message"); /* Skip reserved bytes */ @@ -136,12 +134,11 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p, /* Get the time_t from the file */ UINT32DECODE(p, tmp_time); - the_time=(time_t)tmp_time; /* The return value */ if (NULL==(mesg = H5FL_MALLOC(time_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - *mesg = the_time; + *mesg = (time_t)tmp_time; /* Set return value */ ret_value=mesg; |