summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 3098419..dae7f19 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -3364,13 +3364,12 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/)
*/
if (H5T_get_size(type)>=H5T_get_size(fill.type)) {
buf = value;
- if (tpath->cdata.need_bkg>=H5T_BKG_TEMP &&
- NULL==(bkg=H5MM_malloc(H5T_get_size(type))))
+ if (tpath->cdata.need_bkg && NULL==(bkg=H5MM_malloc(H5T_get_size(type))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion");
} else {
if (NULL==(buf=H5MM_malloc(H5T_get_size(fill.type))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion");
- if (tpath->cdata.need_bkg>=H5T_BKG_TEMP)
+ if (tpath->cdata.need_bkg)
bkg = value;
}
HDmemcpy(buf, fill.buf, H5T_get_size(fill.type));