summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle')
-rwxr-xr-xcoccinelle/run-coccinelle.sh3
-rw-r--r--coccinelle/systemd-definitions.iso20
2 files changed, 1 insertions, 22 deletions
diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh
index be80a76a5f..1fdef5f63e 100755
--- a/coccinelle/run-coccinelle.sh
+++ b/coccinelle/run-coccinelle.sh
@@ -10,7 +10,6 @@ EXCLUDED_PATHS=(
)
top="$(git rev-parse --show-toplevel)"
-iso_defs="$top/coccinelle/systemd-definitions.iso"
args=
# Create an array from files tracked by git...
@@ -37,7 +36,7 @@ for SCRIPT in ${@-$top/coccinelle/*.cocci} ; do
TMPFILE=`mktemp`
echo "+ spatch --sp-file $SCRIPT $args ..."
parallel --halt now,fail=1 --keep-order --noswap --max-args=20 \
- spatch --iso-file $iso_defs --sp-file $SCRIPT $args ::: "${files[@]}" \
+ spatch --sp-file $SCRIPT $args ::: "${files[@]}" \
2>"$TMPFILE" || cat "$TMPFILE"
echo -e "--x-- Processed $SCRIPT --x--\n"
done
diff --git a/coccinelle/systemd-definitions.iso b/coccinelle/systemd-definitions.iso
deleted file mode 100644
index 92db763a29..0000000000
--- a/coccinelle/systemd-definitions.iso
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Statement isomorphisms - replace explicit checks against NULL with a
- * shorter variant, which relies on C's downgrade-to-bool feature.
- * The expression metavariables should be declared as pointers, however,
- * that doesn't work well with complex expressions like:
- * if (UNIT(p)->default_dependencies != NULL)
- */
-
-Statement
-@@
-expression X;
-statement S;
-@@
-if (X == NULL) S => if (!X) S
-
-Statement
-@@
-expression X;
-statement S;
-@@
-if (X != NULL) S => if (X) S