Skip to content

Commit

Permalink
Remove redundant URL check
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Nov 15, 2023
1 parent 07eebd3 commit 8e0d25a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rest_vol_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ RV_link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_loc_params_t
new_link_loc_obj = (RV_object_t *)hard_link_target_obj;
} /* end if */

if (new_link_loc_obj && ((base_URL = new_link_loc_obj->domain->u.file.server_info.base_URL) == NULL))
FUNC_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "location object does not have valid server URL");
if (!new_link_loc_obj)
FUNC_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link location object is NULL");

if (!base_URL)
if ((base_URL = new_link_loc_obj->domain->u.file.server_info.base_URL) == NULL)
FUNC_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link creation requires valid server URL");

/* Validate loc_id and check for write access on the file */
Expand Down

0 comments on commit 8e0d25a

Please sign in to comment.