1
0
Fork 0
frr/tools/coccinelle/xcalloc-xmalloc.cocci
Daniel Baumann 3124f89aed
Adding upstream version 10.1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 10:03:58 +01:00

17 lines
208 B
Text

// No need checking against NULL for XMALLOC/XCALLOC.
// If that happens, we have more problems with memory.
@@
type T;
T *ptr;
@@
ptr =
(
XCALLOC(...)
|
XMALLOC(...)
)
...
- if (ptr == NULL)
- return ...;