Skip to content

Commit d9b274d

Browse files
Committing clang-format changes
1 parent 79dd9c8 commit d9b274d

File tree

8 files changed

+30
-28
lines changed

8 files changed

+30
-28
lines changed

src/H5FDros3.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ H5FD__ros3_str_endpoint_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
782782
*/
783783
static herr_t
784784
H5FD__ros3_str_endpoint_delete(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
785-
size_t H5_ATTR_UNUSED size, void *_value)
785+
size_t H5_ATTR_UNUSED size, void *_value)
786786
{
787787
char **value = (char **)_value;
788788
herr_t ret_value = SUCCEED;
@@ -840,8 +840,8 @@ H5Pset_fapl_ros3_endpoint(hid_t fapl_id, const char *endpoint_url)
840840
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for endpoint_src variable.");
841841
H5MM_memcpy(endpoint_src, endpoint_url, strlen(endpoint_url) + 1);
842842
if (H5P_insert(plist, ROS3_ENDPOINT_PROP_NAME, sizeof(char *), &endpoint_src, NULL, NULL, NULL, NULL,
843-
H5FD__ros3_str_endpoint_delete, H5FD__ros3_str_endpoint_copy, H5FD__ros3_str_endpoint_cmp,
844-
H5FD__ros3_str_endpoint_close) < 0)
843+
H5FD__ros3_str_endpoint_delete, H5FD__ros3_str_endpoint_copy,
844+
H5FD__ros3_str_endpoint_cmp, H5FD__ros3_str_endpoint_close) < 0)
845845
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist");
846846
}
847847

@@ -864,8 +864,8 @@ H5Pget_fapl_ros3_endpoint(hid_t fapl_id, size_t size, char *endpoint_dst /*out*/
864864
H5P_genplist_t *plist = NULL;
865865
char *endpoint_src;
866866
htri_t endpoint_exists;
867-
size_t endpointlen = 0;
868-
herr_t ret_value = SUCCEED;
867+
size_t endpointlen = 0;
868+
herr_t ret_value = SUCCEED;
869869

870870
FUNC_ENTER_API(FAIL)
871871

src/H5FDs3comms.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ H5FD__s3comms_s3r_getsize(s3r_t *handle)
676676
/* Parse received headers to extract "Content-Length" from response
677677
* headers, storing file size at handle->filesize.
678678
*/
679-
printf("\nHEADER RESPONSE:%s\n",header_response);
679+
printf("\nHEADER RESPONSE:%s\n", header_response);
680680
if (NULL == (start = HDstrcasestr(header_response, "\r\nContent-Length: ")))
681681
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "could not find \"Content-Length\" in response");
682682

@@ -737,7 +737,8 @@ printf("\nHEADER RESPONSE:%s\n",header_response);
737737
*----------------------------------------------------------------------------
738738
*/
739739
s3r_t *
740-
H5FD__s3comms_s3r_open(const char *url, const H5FD_ros3_fapl_t *fa, const char *fapl_token, const char *fapl_endpoint)
740+
H5FD__s3comms_s3r_open(const char *url, const H5FD_ros3_fapl_t *fa, const char *fapl_token,
741+
const char *fapl_endpoint)
741742
{
742743
CURL *curlh = NULL;
743744
s3r_t *handle = NULL;
@@ -1448,9 +1449,9 @@ H5FD__s3comms_parse_url(const char *url, const char *fapl_endpoint)
14481449
parsed_url_t *purl = NULL;
14491450
parsed_url_t *ret_value = NULL;
14501451
const char *object_url = NULL;
1451-
char bucket_name[512];
1452-
char object_key[1024];
1453-
char s3_url[4096];
1452+
char bucket_name[512];
1453+
char object_key[1024];
1454+
char s3_url[4096];
14541455

14551456
FUNC_ENTER_PACKAGE
14561457

@@ -1463,11 +1464,12 @@ H5FD__s3comms_parse_url(const char *url, const char *fapl_endpoint)
14631464
// Find the '/' delimiter to separate bucket name and object key
14641465
const char *slash_pos = strchr(path_start, '/');
14651466
if (slash_pos == NULL)
1466-
HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL, "Invalid S3 URI format. Missing '/' after bucket name\n");
1467+
HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL,
1468+
"Invalid S3 URI format. Missing '/' after bucket name\n");
14671469

14681470
// Calculate lengths
14691471
size_t bucket_len = slash_pos - path_start;
1470-
size_t key_len = strlen(slash_pos + 1);
1472+
size_t key_len = strlen(slash_pos + 1);
14711473

14721474
/* Copy bucket and key strings into temp variables */
14731475
strncpy(bucket_name, path_start, bucket_len);
@@ -1476,17 +1478,17 @@ H5FD__s3comms_parse_url(const char *url, const char *fapl_endpoint)
14761478
strncpy(object_key, slash_pos + 1, key_len);
14771479
object_key[bucket_len] = '\0';
14781480

1479-
if(fapl_endpoint)
1480-
snprintf(s3_url, strlen(fapl_endpoint) + strlen(bucket_name) + strlen(object_key) + 3,
1481-
"%s/%s/%s", fapl_endpoint, bucket_name, object_key);
1481+
if (fapl_endpoint)
1482+
snprintf(s3_url, strlen(fapl_endpoint) + strlen(bucket_name) + strlen(object_key) + 3, "%s/%s/%s",
1483+
fapl_endpoint, bucket_name, object_key);
14821484
else
14831485
/*object_url = "https://s3."+region_code+".amazonaws.com/"+bucket_name+"/"+object_key;*/
14841486
snprintf(s3_url, 24 + strlen(bucket_name) + strlen(object_key) + 3,
14851487
"https://s3.amazonaws.com/%s/%s", bucket_name, object_key);
1486-
object_url = s3_url;
1488+
object_url = s3_url;
14871489
}
14881490
else
1489-
object_url = url;
1491+
object_url = url;
14901492

14911493
/* Get a curl URL handle */
14921494
if (NULL == (curlurl = curl_url()))
@@ -1522,7 +1524,8 @@ H5FD__s3comms_parse_url(const char *url, const char *fapl_endpoint)
15221524
if (CURLUE_OK != rc && CURLUE_NO_QUERY != rc)
15231525
HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL, "unable to get url query");
15241526

1525-
printf("PURL:\n--%s\n--%s\n--%s\n--%s\n--%s\n",purl->scheme,purl->host,purl->port,purl->path,purl->query);
1527+
printf("PURL:\n--%s\n--%s\n--%s\n--%s\n--%s\n", purl->scheme, purl->host, purl->port, purl->path,
1528+
purl->query);
15261529
ret_value = purl;
15271530

15281531
done:

src/H5FDs3comms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ H5_DLL herr_t H5FD__s3comms_hrb_destroy(hrb_t *buf);
401401
H5_DLL herr_t H5FD__s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value);
402402

403403
/* S3 request buffer routines */
404-
H5_DLL s3r_t *H5FD__s3comms_s3r_open(const char *url, const H5FD_ros3_fapl_t *fa, const char *fapl_token, const
405-
char *fapl_endpoint);
404+
H5_DLL s3r_t *H5FD__s3comms_s3r_open(const char *url, const H5FD_ros3_fapl_t *fa, const char *fapl_token,
405+
const char *fapl_endpoint);
406406
H5_DLL herr_t H5FD__s3comms_s3r_close(s3r_t *handle);
407407
H5_DLL size_t H5FD__s3comms_s3r_get_filesize(s3r_t *handle);
408408
H5_DLL herr_t H5FD__s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest);

tools/lib/h5tools.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
564564
0)
565565
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3_token() failed");
566566

567-
if (H5Pset_fapl_ros3_endpoint(fapl_id, ((const H5FD_ros3_fapl_ext_t *)vfd_info->info)->ep_url)
568-
< 0)
567+
if (H5Pset_fapl_ros3_endpoint(fapl_id,
568+
((const H5FD_ros3_fapl_ext_t *)vfd_info->info)->ep_url) < 0)
569569
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3_endpoint() failed");
570570
#else
571571
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");

tools/lib/h5tools_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim, H5FD_ros3_fapl_e
10501050
else {
10511051
ccred[3] = (const char *)s3cred[3];
10521052
}
1053-
printf("\ncreds:%s::%s::%s::%s:\n",ccred[0],ccred[1],ccred[2],ccred[3]);
1053+
printf("\ncreds:%s::%s::%s::%s:\n", ccred[0], ccred[1], ccred[2], ccred[3]);
10541054

10551055
if (0 == h5tools_populate_ros3_fapl(fapl_config_out, ccred))
10561056
H5TOOLS_GOTO_ERROR(FAIL, "failed to populate S3 VFD FAPL config");

tools/src/h5dump/h5dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ parse_command_line(int argc, const char *const *argv)
12141214

12151215
case '!':
12161216
#ifdef H5_HAVE_ROS3_VFD
1217-
sprintf(((H5FD_ros3_fapl_ext_t*)vfd_info_g.info)->ep_url, "%s", H5_optarg);
1217+
sprintf(((H5FD_ros3_fapl_ext_t *)vfd_info_g.info)->ep_url, "%s", H5_optarg);
12181218
#else
12191219
error_msg(
12201220
"Read-Only S3 VFD is not available unless enabled when HDF5 is configured and built.\n");

tools/src/h5ls/h5ls.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,13 +2957,12 @@ main(int argc, char *argv[])
29572957

29582958
start = strchr(argv[argno], '=');
29592959
if (start == NULL) {
2960-
fprintf(rawerrorstream,
2961-
"Error: Unable to parse null endpoint url\n");
2960+
fprintf(rawerrorstream, "Error: Unable to parse null endpoint url\n");
29622961
usage();
29632962
leave(EXIT_FAILURE);
29642963
}
29652964
start++;
2966-
sprintf(((H5FD_ros3_fapl_ext_t*)vfd_info.info)->ep_url, "%s", start);
2965+
sprintf(((H5FD_ros3_fapl_ext_t *)vfd_info.info)->ep_url, "%s", start);
29672966
#else
29682967
fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not available unless enabled when HDF5 is "
29692968
"configured and built.\n\n");

tools/src/h5stat/h5stat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
964964

965965
case 'y':
966966
#ifdef H5_HAVE_ROS3_VFD
967-
sprintf(((H5FD_ros3_fapl_ext_t*)vfd_info.info)->ep_url, "%s", H5_optarg);
967+
sprintf(((H5FD_ros3_fapl_ext_t *)vfd_info.info)->ep_url, "%s", H5_optarg);
968968
#else
969969
error_msg(
970970
"Read-Only S3 VFD is not available unless enabled when HDF5 is configured and built.\n");

0 commit comments

Comments
 (0)