aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle/test-operator-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/test-operator-cleanup')
-rwxr-xr-xscripts/coccinelle/test-operator-cleanup11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/coccinelle/test-operator-cleanup b/scripts/coccinelle/test-operator-cleanup
new file mode 100755
index 0000000000..e7822542a4
--- /dev/null
+++ b/scripts/coccinelle/test-operator-cleanup
@@ -0,0 +1,11 @@
+#!/usr/bin/perl -w -p -i
+
+next if m#^ */\*# or m#^ *\* #;
+
+s/<([,)])/OP_LT$1/;
+s/(?<=[\s,])>([,)])/OP_GT$1/;
+#s/>([,)])/OP_GT$1/;
+s/==([,)])/OP_EQ$1/;
+s/>=([,)])/OP_GE$1/;
+s/<=([,)])/OP_LE$1/;
+s/!=([,)])/OP_NE$1/;