diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-30 18:21:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-30 18:21:54 (GMT) |
commit | 77b2235f8b22754fb44418fa9fbb499c245c1088 (patch) | |
tree | bae71d58a5c0a73c4b649fdd678adf66a4ac8a12 /src/H5Osdspace.c | |
parent | 03ae0fecf0c60fc5ee722e27394c261a7a7345f7 (diff) | |
download | hdf5-77b2235f8b22754fb44418fa9fbb499c245c1088.zip hdf5-77b2235f8b22754fb44418fa9fbb499c245c1088.tar.gz hdf5-77b2235f8b22754fb44418fa9fbb499c245c1088.tar.bz2 |
[svn-r19158] Description:
Bring r19156 from trunk to 1.8 branch:
Bring revisions from Coverity branch back to trunk:
r19044:
Coverity #449 - Line 1560 called function H5O_chunk_protect for 2 pointers to allocate. But when there's failure on the second one, the first wasn't freed
(H5O_chunk_unprotect). We fixed it by freeing the pointers when an error happens.
r19045:
Fixed coverity issue # 319. Free sec_node in done if it is not NULL.
r19046:
Add intended but missing assignments to initialize pointers to NULL (coverity issue fixes).
r19049:
Hdf5_1_8_coverity branch was recreated from hdf5_1_8 branch in revision 18839 without fix for Coverity issue #84 having been propagated to the hdf5_1_8 branch. This revision adds the fix again.
r19060:
added parentheses to see if they will keep subversion from getting confused
r19061:
Fix coverity item 139. Fixed incorrect condition for freeing buffer on error.
Fix coverity items 20 and 21. Removed unused NTESTS facility from dtypes.c.
Cleanup in H5Shyper.c.
r19062:
Fix coverity item 450. Check to see if chk_proxy has been allocated before
attempting to free it.
Fix coverity item 454. Check to see if allocation of buf failed in
H5D_fill_refill_vl.
Fix coverity items 455-457. Initilize hid_t's to -1, check their value before
attempting to close them, and check if the close failed.
r19063:
New fix to address coverity issue #84. Check that pointers in H5Z_xform_find_type are not NULL before passing them to H5T_cmp.
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug & production
(h5committested on Coverity branch)
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r-- | src/H5Osdspace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index f4cac40..323bec9 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -246,15 +246,15 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg) /* Version */ HDassert(sdim->version > 0); HDassert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2); - *p++ = sdim->version; + *p++ = (uint8_t)sdim->version; /* Rank */ - *p++ = sdim->rank; + *p++ = (uint8_t)sdim->rank; /* Flags */ if(sdim->max) flags |= H5S_VALID_MAX; - *p++ = flags; + *p++ = (uint8_t)flags; /* Dataspace type */ if(sdim->version > H5O_SDSPACE_VERSION_1) @@ -319,7 +319,7 @@ H5O_sdspace_copy(const void *_mesg, void *_dest) done: if(NULL == ret_value) - if(dest && NULL != _dest) + if(dest && NULL == _dest) dest = H5FL_FREE(H5S_extent_t, dest); FUNC_LEAVE_NOAPI(ret_value) |