diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2019-04-17 22:42:01 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2019-04-17 22:42:01 (GMT) |
commit | b5ef82a1786605ae86502bc82086047720b7d4ca (patch) | |
tree | ce00e05f1cf3cb5bd6ea5d2e54392353b1242e6e /src/H5system.c | |
parent | fc47e2e07a252f9421c6d11e88cfd63e5a337183 (diff) | |
download | hdf5-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.c | 6 |
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))) |