diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-10-07 15:26:16 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-10-09 14:48:44 +0200 |
commit | 7e97526421b0a1180fb16fbfcf8a758e48d529e6 (patch) | |
tree | e629609861167728733eb4b9194223227bee7df9 | |
parent | coccinelle: correctly resolve our own macros (diff) | |
download | systemd-7e97526421b0a1180fb16fbfcf8a758e48d529e6.tar.xz systemd-7e97526421b0a1180fb16fbfcf8a758e48d529e6.zip |
coccinelle: check for invalid errno comparisons
Prompted by #15868
-rw-r--r-- | coccinelle/errno-check.cocci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/coccinelle/errno-check.cocci b/coccinelle/errno-check.cocci new file mode 100644 index 0000000000..709cb4ace6 --- /dev/null +++ b/coccinelle/errno-check.cocci @@ -0,0 +1,10 @@ +@@ +constant c; +@@ +( +- errno == -c ++ errno == c +| +- errno != -c ++ errno != c +) |