From: Frantisek Sumsal Date: Wed, 7 Oct 2020 13:26:16 +0000 (+0200) Subject: coccinelle: check for invalid errno comparisons X-Git-Tag: v247-rc1~95^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e97526421b0a1180fb16fbfcf8a758e48d529e6;p=thirdparty%2Fsystemd.git coccinelle: check for invalid errno comparisons Prompted by #15868 --- diff --git a/coccinelle/errno-check.cocci b/coccinelle/errno-check.cocci new file mode 100644 index 00000000000..709cb4ace6f --- /dev/null +++ b/coccinelle/errno-check.cocci @@ -0,0 +1,10 @@ +@@ +constant c; +@@ +( +- errno == -c ++ errno == c +| +- errno != -c ++ errno != c +)