Skip to content

Commit 0e963db

Browse files
Committing clang-format changes
1 parent c1ddf3b commit 0e963db

File tree

9 files changed

+40
-37
lines changed

9 files changed

+40
-37
lines changed

java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public class H5FD_ros3_fapl_t implements Serializable {
6363
public H5FD_ros3_fapl_t()
6464
{
6565
/* H5FD_ros3_fapl_t("", "", ""); */ /* defer */
66-
this.version = 1; /* H5FD_CURR_ROS3_FAPL_T_VERSION */
67-
this.aws_region = "";
68-
this.secret_id = "";
69-
this.secret_key = "";
66+
this.version = 1; /* H5FD_CURR_ROS3_FAPL_T_VERSION */
67+
this.aws_region = "";
68+
this.secret_id = "";
69+
this.secret_key = "";
7070
this.session_token = "";
7171
}
7272

@@ -83,9 +83,9 @@ public H5FD_ros3_fapl_t(String region, String id, String key)
8383
{
8484
this.version = 1; /* must equal H5FD_CURR_ROS3_FAPL_T_VERSION */
8585
/* as found in H5FDros3.h */
86-
this.aws_region = region;
87-
this.secret_id = id;
88-
this.secret_key = key;
86+
this.aws_region = region;
87+
this.secret_id = id;
88+
this.secret_key = key;
8989
this.session_token = "";
9090
}
9191

@@ -103,9 +103,9 @@ public H5FD_ros3_fapl_t(String region, String id, String key, String token)
103103
{
104104
this.version = 1; /* must equal H5FD_CURR_ROS3_FAPL_T_VERSION */
105105
/* as found in H5FDros3.h */
106-
this.aws_region = region;
107-
this.secret_id = id;
108-
this.secret_key = key;
106+
this.aws_region = region;
107+
this.secret_id = id;
108+
this.secret_key = key;
109109
this.session_token = token;
110110
}
111111

java/src/jni/h5pFAPLImp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3(JNIEnv *env, jclass clss, jlong fapl_id)
828828

829829
if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.session_token))) {
830830
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
831-
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create session_token string");
831+
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
832+
"H5Pget_fapl_ros3: out of memory - can't create session_token string");
832833
}
833834
args[3].l = j_tok;
834835

@@ -946,7 +947,8 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1ros3(JNIEnv *env, jclass clss, jlong fapl_id,
946947
else
947948
memset(instance.session_token, 0, H5FD_ROS3_MAX_SESSION_TOKEN_LEN + 1);
948949

949-
if (instance.aws_region[0] != '\0' && instance.secret_id[0] != '\0' && instance.secret_key[0] != '\0' && instance.session_token[0] != '\0')
950+
if (instance.aws_region[0] != '\0' && instance.secret_id[0] != '\0' && instance.secret_key[0] != '\0' &&
951+
instance.session_token[0] != '\0')
950952
instance.authenticate = true;
951953

952954
if (H5Pset_fapl_ros3((hid_t)fapl_id, &instance) < 0)

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: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,8 @@ H5FD__s3comms_s3r_getsize(s3r_t *handle)
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()))

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/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)