summaryrefslogtreecommitdiffstats
path: root/src/H5MM.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5MM.c')
-rw-r--r--src/H5MM.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/H5MM.c b/src/H5MM.c
index fbd66f7..d5fff2f 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -98,18 +98,20 @@ done:
char *
H5MM_xstrdup(const char *s)
{
- char *ret_value;
+ char *ret_value=NULL;
/* Use FUNC_ENTER_NOINIT here to avoid performance issues */
FUNC_ENTER_NOINIT(H5MM_xstrdup);
- if (!s)
- HGOTO_DONE(NULL);
- ret_value = H5MM_malloc(HDstrlen(s) + 1);
- assert (ret_value);
- HDstrcpy(ret_value, s);
+ if (s) {
+ ret_value = H5MM_malloc(HDstrlen(s) + 1);
+ assert (ret_value);
+ HDstrcpy(ret_value, s);
+ } /* end if */
+#ifdef LATER
done:
+#endif /* LATER */
FUNC_LEAVE(ret_value);
}