Skip to content

Commit 80d9f68

Browse files
restyled-commitsThirsrin
authored andcommitted
Restyled by clang-format
1 parent aed4131 commit 80d9f68

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/platform/Linux/DiagnosticDataProviderImpl.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeap
248248
currentHeapUsed = mallocInfo.uordblks;
249249

250250
// Update the maximum heap high watermark if the current heap usage exceeds it.
251-
if (currentHeapUsed > maxHeapHighWatermark) {
251+
if (currentHeapUsed > maxHeapHighWatermark)
252+
{
252253
maxHeapHighWatermark = currentHeapUsed;
253254
}
254255
return CHIP_NO_ERROR;
@@ -269,7 +270,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu
269270
// the hard disk, called swap space, and free up that page of memory. So it is impossible
270271
// to know accurately peak physical memory it use.
271272
// Update the maximum heap high watermark if the current heap usage exceeds it.
272-
if (static_cast<ssize_t>(mallocInfo.uordblks) > static_cast<ssize_t>(maxHeapHighWatermark)) {
273+
if (static_cast<ssize_t>(mallocInfo.uordblks) > static_cast<ssize_t>(maxHeapHighWatermark))
274+
{
273275
maxHeapHighWatermark = mallocInfo.uordblks;
274276
}
275277

@@ -288,7 +290,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks()
288290
// On Linux, the write operation is non-op since we always rely on the mallinfo system
289291
// function to get the current heap memory.
290292
struct mallinfo mallocInfo = mallinfo();
291-
maxHeapHighWatermark = mallocInfo.uordblks;
293+
maxHeapHighWatermark = mallocInfo.uordblks;
292294

293295
return CHIP_NO_ERROR;
294296
}

0 commit comments

Comments
 (0)