Skip to content

Commit cd9a841

Browse files
committed
Fix formatting
1 parent dce0e80 commit cd9a841

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cpp/misra/src/rules/RULE-21-6-1/DynamicMemoryShouldNotBeUsed.ql

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ abstract class DynamicMemoryDeallocatingFunction extends Function { }
209209
* and C++ deallocation functions (`operator delete`, `operator delete[]`).
210210
*/
211211
class DirectDynamicMemoryDeallocatingFunction extends DynamicMemoryDeallocatingFunction {
212-
DirectDynamicMemoryDeallocatingFunction() {
213-
this instanceof DeallocationFunction
214-
}
212+
DirectDynamicMemoryDeallocatingFunction() { this instanceof DeallocationFunction }
215213
}
216214

217215
/**
@@ -231,9 +229,7 @@ where
231229
(
232230
// Direct allocation: malloc, calloc, realloc, aligned_alloc, operator new, operator new[]
233231
call.getTarget() instanceof DirectDynamicMemoryAllocatingFunction and
234-
message =
235-
"Call to dynamic memory allocating function '" + call.getTarget().getName() +
236-
"'."
232+
message = "Call to dynamic memory allocating function '" + call.getTarget().getName() + "'."
237233
or
238234
// Indirect allocation: std library types that allocate internally
239235
call.getTarget() instanceof IndirectDynamicMemoryAllocatingFunction and
@@ -245,8 +241,6 @@ where
245241
// Excludes realloc (already caught as allocation).
246242
call.getTarget() instanceof DynamicMemoryDeallocatingFunction and
247243
not call.getTarget() instanceof DynamicMemoryAllocatingFunction and
248-
message =
249-
"Call to dynamic memory deallocating function '" + call.getTarget().getName() +
250-
"'."
244+
message = "Call to dynamic memory deallocating function '" + call.getTarget().getName() + "'."
251245
)
252246
select call, message

0 commit comments

Comments
 (0)