summaryrefslogtreecommitdiffstats
path: root/src/H5Gent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gent.c')
-rw-r--r--src/H5Gent.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/H5Gent.c b/src/H5Gent.c
index fa58ca7..ffc7a52 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -417,7 +417,7 @@ H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5G_ent_copy_depth_t dept
dst->canon_path_r=NULL;
} else if(depth==H5G_COPY_SHALLOW) {
/* Discarding 'const' qualifier OK - QAK */
- HDmemset(src, 0, sizeof(H5G_entry_t));
+ H5G_ent_reset(src);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED);
@@ -425,6 +425,39 @@ H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5G_ent_copy_depth_t dept
/*-------------------------------------------------------------------------
+ * Function: H5G_ent_reset
+ *
+ * Purpose: Reset a symbol table entry to an empty state
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ *
+ * Date: August 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_ent_reset(H5G_entry_t *ent)
+{
+ FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_reset);
+
+ /* Check arguments */
+ HDassert(ent);
+
+ /* Clear the symbol table entry to an empty state */
+ HDmemset(ent, 0, sizeof(H5G_entry_t));
+ ent->header = HADDR_UNDEF;
+
+ FUNC_LEAVE_NOAPI(SUCCEED);
+} /* end H5G_ent_reset() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5G_ent_debug
*
* Purpose: Prints debugging information about a symbol table entry.