diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-21 05:37:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 05:37:07 (GMT) |
commit | 56513d9df75de92bb96f24e9d0e5e30dce54d065 (patch) | |
tree | 61ddcb5cf21d4981174719be3d09c99d958817f9 /src | |
parent | 94ea835bbb50d5b5215c7e02515cd0f603985c92 (diff) | |
download | hdf5-56513d9df75de92bb96f24e9d0e5e30dce54d065.zip hdf5-56513d9df75de92bb96f24e9d0e5e30dce54d065.tar.gz hdf5-56513d9df75de92bb96f24e9d0e5e30dce54d065.tar.bz2 |
Remove dead code behind #ifdef OLD_WAY (#3163)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5B2.c | 14 | ||||
-rw-r--r-- | src/H5Dio.c | 18 | ||||
-rw-r--r-- | src/H5HG.c | 16 |
3 files changed, 6 insertions, 42 deletions
@@ -1317,16 +1317,12 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") - /* Note: don't push error on stack, leave that to next higher level, - * since many times the B-tree is searched in order to determine - * if an object exists in the B-tree or not. -QAK - */ -#ifdef OLD_WAY - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node") -#else /* OLD_WAY */ + /* Note: don't push error on stack, leave that to next higher level, + * since many times the B-tree is searched in order to determine + * if an object exists in the B-tree or not. + */ HGOTO_DONE(FAIL) -#endif /* OLD_WAY */ - } /* end if */ + } else { /* Make callback for current record */ if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) { diff --git a/src/H5Dio.c b/src/H5Dio.c index 1cd5835..69ba310 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -827,24 +827,6 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) #endif /* H5_HAVE_PARALLEL */ } -#ifdef OLD_WAY - /* - * This was taken out because it can be called in a parallel program with - * independent access, causing the metadata cache to get corrupted. Its been - * disabled for all types of access (serial as well as parallel) to make the - * modification time consistent for all programs. -QAK - * - * We should set a value in the dataset's shared information instead and flush - * it to the file when the dataset is being closed. -QAK - */ - /* - * Update modification time. We have to do this explicitly because - * writing to a dataset doesn't necessarily change the object header. - */ - if (H5O_touch(&(dataset->oloc), FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time") -#endif /* OLD_WAY */ - done: /* Shut down the I/O op information */ for (i = 0; i < io_op_init; i++) { @@ -169,10 +169,6 @@ H5HG__create(H5F_t *f, size_t size) * align the pointer, but this might not be the case. */ n = (size_t)H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk); -#ifdef OLD_WAY - /* Don't bother zeroing out the rest of the info in the heap -QAK */ - HDmemset(p, 0, n); -#endif /* OLD_WAY */ p += n; /* The freespace object */ @@ -184,10 +180,6 @@ H5HG__create(H5F_t *f, size_t size) UINT16ENCODE(p, 0); /*reference count*/ UINT32ENCODE(p, 0); /*reserved*/ H5F_ENCODE_LENGTH(f, p, heap->obj[0].size); -#ifdef OLD_WAY - /* Don't bother zeroing out the rest of the info in the heap -QAK */ - HDmemset(p, 0, (size_t)((heap->chunk + heap->size) - p)); -#endif /* OLD_WAY */ /* Add this heap to the beginning of the CWFS list */ if (H5F_cwfs_add(f, heap) < 0) @@ -537,14 +529,8 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate global heap object") /* Copy data into the heap */ - if (size > 0) { + if (size > 0) H5MM_memcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size); -#ifdef OLD_WAY - /* Don't bother zeroing out the rest of the info in the heap -QAK */ - HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, - need - (H5HG_SIZEOF_OBJHDR(f) + size)); -#endif /* OLD_WAY */ - } /* end if */ heap_flags |= H5AC__DIRTIED_FLAG; /* Return value */ |