Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel committed Jul 25, 2024
1 parent d3b84a8 commit 3ebc449
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/MeshBlock.C
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,9 @@ void MeshBlock::tagBoundaryFaces(void)
const int nfacevert = numfaceverts[ctype][f];
const int* faceNodes = faceInfo[ctype][f];

if (flagwbc &&
checkFaceBoundaryNodes(
inode, iflagwbc.data(), nfacevert, faceNodes, nullptr))
if (flagwbc && checkFaceBoundaryNodes(
inode, iflagwbc.data(), nfacevert,
faceNodes, nullptr))
nwbcface++;
if (flagobc && checkFaceBoundaryNodes(
inode, iflagobc.data(), nfacevert,
Expand Down
6 changes: 4 additions & 2 deletions src/highOrder.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ void MeshBlock::getCellIblanks2(void)
int verbose;

icell = 0;
if (iblank_cell == nullptr) iblank_cell = (int*)malloc(sizeof(int) * ncells);
if (iblank_cell == nullptr)
iblank_cell = (int*)malloc(sizeof(int) * ncells);

Check warning

Code scanning / CodeQL

Resource not released in destructor Warning

Resource iblank_cell is acquired by class MeshBlock but not released anywhere in this class.
for (n = 0; n < ntypes; n++) {
nvert = nv[n];
for (i = 0; i < nc[n]; i++) {
Expand Down Expand Up @@ -92,7 +93,8 @@ void MeshBlock::getCellIblanks(void)
}

icell = 0;
if (iblank_cell == nullptr) iblank_cell = (int*)malloc(sizeof(int) * ncells);
if (iblank_cell == nullptr)
iblank_cell = (int*)malloc(sizeof(int) * ncells);

Check warning

Code scanning / CodeQL

Resource not released in destructor Warning

Resource iblank_cell is acquired by class MeshBlock but not released anywhere in this class.
for (n = 0; n < ntypes; n++) {
nvert = nv[n];
for (i = 0; i < nc[n]; i++) {
Expand Down

0 comments on commit 3ebc449

Please sign in to comment.