Skip to content

Commit 681a017

Browse files
committed
format
1 parent cec63d9 commit 681a017

5 files changed

Lines changed: 23 additions & 23 deletions

File tree

‎source/h5vol/H5VolReadWrite.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,12 @@ htri_t gExistsUnderGrp(H5VL_ObjDef_t *owner, const char *obj_name)
370370
return 0;
371371

372372
size_t len = strlen(owner->m_Path) + 4 + strlen(obj_name);
373-
char* fullPath = (char*)malloc(len);
373+
char *fullPath = (char*)malloc(len);
374374
if (!fullPath)
375375
{
376376
return 0;
377377
}
378-
//char fullPath[strlen(owner->m_Path) + 4 + strlen(obj_name)];
378+
379379
sprintf(fullPath, "%s/%s", owner->m_Path, obj_name);
380380

381381
if (NULL != adios2_inquire_attribute(owner->m_FileIO, fullPath))
@@ -430,17 +430,17 @@ bool gRemoveUnderGrp(H5VL_ObjDef_t *owner, const char *obj_name)
430430
if (adios2_error_none == adios2_remove_attribute(&result, owner->m_FileIO, fullPath))
431431
if (adios2_true == result)
432432
{
433-
free (fullPath);
433+
free(fullPath);
434434
return true;
435435
}
436436
if (adios2_error_none == adios2_remove_variable(&result, owner->m_FileIO, fullPath))
437437
if (adios2_true == result)
438438
{
439-
free (fullPath);
439+
free(fullPath);
440440
return true;
441441
}
442442

443-
free (fullPath);
443+
free(fullPath);
444444
#ifdef NEVER
445445
return false;
446446
#else
@@ -1072,18 +1072,18 @@ adios2_attribute *gADIOS2CreateAttr(adios2_io *io, H5VL_AttrDef_t *input, const
10721072
int i;
10731073

10741074
size_t count = shape[0];
1075-
char **arrayOfStr = (char**)malloc(count * sizeof(char*));
1075+
char **arrayOfStr = (char **)malloc(count * sizeof(char *));
10761076
if (!arrayOfStr)
10771077
{
10781078
return NULL;
1079-
}
1079+
}
10801080
for (i = 0; i < shape[0]; i++)
10811081
{
1082-
arrayOfStr[i] = (char*) malloc(sizeof(char) * strSize + 1);
1082+
arrayOfStr[i] = (char *)malloc(sizeof(char) * strSize + 1);
10831083
if (!arrayOfStr[i])
10841084
{
10851085
for (size_t j = 0; j < i; j++)
1086-
free(arrayOfStr[j]);
1086+
free(arrayOfStr[j]);
10871087
free(arrayOfStr);
10881088
return NULL;
10891089
}

‎source/h5vol/H5VolUtil.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ int gUtilADIOS2GetShape(hid_t space_id, size_t *shape, size_t ndims)
7373
}
7474

7575
// get num dimensions
76-
hsize_t* h5Shape = (hsize_t*)malloc(ndims * sizeof(hsize_t));
76+
hsize_t *h5Shape = (hsize_t*)malloc(ndims * sizeof(hsize_t));
7777
if (h5Shape == NULL)
7878
{
79-
return H5VL_CODE_FAIL;
79+
return H5VL_CODE_FAIL;
8080
}
8181
H5Sget_simple_extent_dims(space_id, h5Shape, NULL);
8282

@@ -93,15 +93,15 @@ int gUtilADIOS2GetBlockInfo(hid_t hyperSlab_id, size_t *start, size_t *count, hs
9393
return npts;
9494
else
9595
{
96-
hsize_t* s = (hsize_t*)malloc(ndims * sizeof(hsize_t));
96+
hsize_t *s = (hsize_t *)malloc(ndims * sizeof(hsize_t));
9797
if (s == NULL)
9898
{
9999
return H5VL_CODE_FAIL;
100100
}
101-
hsize_t* e = (hsize_t*)malloc(ndims * sizeof(hsize_t));
101+
hsize_t *e = (hsize_t *)malloc(ndims * sizeof(hsize_t));
102102
if (e == NULL)
103103
{
104-
free (s);
104+
free(s);
105105
return H5VL_CODE_FAIL;
106106
}
107107

@@ -116,8 +116,8 @@ int gUtilADIOS2GetBlockInfo(hid_t hyperSlab_id, size_t *start, size_t *count, hs
116116
numElements *= count[k];
117117
}
118118

119-
free (s);
120-
free (e);
119+
free(s);
120+
free(e);
121121

122122
if (npts == numElements)
123123
return npts; // ok got block

‎source/h5vol/H5Vol_attr.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ void *H5VL_adios2_attr_open(void *obj, const H5VL_loc_params_t *loc_params, cons
3838
}
3939
else
4040
{
41-
size_t llen = strlen(name)+2;
42-
char* withSlash = (char*)malloc(llen);
41+
size_t llen = strlen(name) + 2;
42+
char *withSlash = (char*)malloc(llen);
4343
if (!withSlash)
4444
{
4545
return NULL;
46-
}
46+
}
4747
snprintf(withSlash, sizeof(withSlash), "/%s", name);
4848
withSlash[strlen(name) + 1] = '\0';
4949
attr = gLocateAttrFrom(vol, withSlash);
@@ -248,12 +248,12 @@ herr_t H5VL_adios2_attr_specific(void *obj, const H5VL_loc_params_t *loc_params,
248248
else
249249
{
250250
size_t llen = strlen(vol->m_Path) + 4 + strlen(attr_name);
251-
char* fullPath = (char*)malloc(llen);
251+
char *fullPath = (char*)malloc(llen);
252252
if (!fullPath)
253253
{
254254
return 0;
255255
}
256-
//char fullPath[strlen(vol->m_Path) + 4 + strlen(attr_name)];
256+
257257
gGenerateFullPath(fullPath, vol->m_Path, attr_name);
258258
gADIOS2RemoveAttr(vol->m_FileIO, fullPath);
259259
free(fullPath);

‎source/h5vol/H5Vol_dataset.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void *H5VL_adios2_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
2424
{
2525
REQUIRE_SUCC((GROUP == vol->m_ObjType), NULL);
2626
size_t pathSize = strlen(vol->m_Path) + 1 + strlen(name);
27-
char* fullPath = (char*)malloc(pathSize+1);
27+
char *fullPath = (char *)malloc(pathSize + 1);
2828
if (fullPath == NULL)
2929
{
3030
return NULL;

‎source/h5vol/H5Vol_link.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ herr_t H5VL_adios2_link_get(void *obj, const H5VL_loc_params_t *loc_params,
6565
if ((GROUP == vol->m_ObjType) || (ROOT == vol->m_ObjType))
6666
{
6767
// so idx makes sense
68-
*ret = (size_t) gGetNameOfNthItem(vol, loc_params->loc_data.loc_by_idx.n, name);
68+
*ret = (size_t)gGetNameOfNthItem(vol, loc_params->loc_data.loc_by_idx.n, name);
6969
return 0;
7070
}
7171
break;

0 commit comments

Comments
 (0)