summaryrefslogtreecommitdiffstats
path: root/qa/coccinelle/direct-packet.cocci
blob: b184225f7190c568c60a89ea2fc64a730dc24a78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@directpacket@
identifier p;
typedef Packet;
position p1;
@@

Packet p@p1;

@ script:python @
p1 << directpacket.p1;
@@

print("Invalid Packet definition, explicit allocation must be used at %s:%s" % (p1[0].file, p1[0].line))
import sys
sys.exit(1)