summaryrefslogtreecommitdiffstats
path: root/src/H5system.c
diff options
context:
space:
mode:
authorSongyu Lu <songyulu@hdfgroup.org>2019-04-17 22:42:01 (GMT)
committerSongyu Lu <songyulu@hdfgroup.org>2019-04-17 22:42:01 (GMT)
commitb5ef82a1786605ae86502bc82086047720b7d4ca (patch)
treece00e05f1cf3cb5bd6ea5d2e54392353b1242e6e /src/H5system.c
parentfc47e2e07a252f9421c6d11e88cfd63e5a337183 (diff)
downloadhdf5-b5ef82a1786605ae86502bc82086047720b7d4ca.zip
hdf5-b5ef82a1786605ae86502bc82086047720b7d4ca.tar.gz
hdf5-b5ef82a1786605ae86502bc82086047720b7d4ca.tar.bz2
Moving the handling of null prefix into H5_combine_path.
Diffstat (limited to 'src/H5system.c')
-rw-r--r--src/H5system.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5system.c b/src/H5system.c
index 2ddc29a..35123db 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -1256,13 +1256,13 @@ H5_combine_path(const char* path1, const char* path2, char **full_name /*out*/)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(path1);
HDassert(path2);
- path1_len = HDstrlen(path1);
+ if(path1)
+ path1_len = HDstrlen(path1);
path2_len = HDstrlen(path2);
- if(*path1 == '\0' || H5_CHECK_ABSOLUTE(path2)) {
+ if(path1 == NULL || *path1 == '\0' || H5_CHECK_ABSOLUTE(path2)) {
/* If path1 is empty or path2 is absolute, simply use path2 */
if(NULL == (*full_name = (char *)H5MM_strdup(path2)))