https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /usr/src/linux-headers-5.15.0-153/scripts/coccinelle/misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/src/linux-headers-5.15.0-153/scripts/coccinelle/misc/excluded_middle.cocci
// SPDX-License-Identifier: GPL-2.0-only
///
/// Condition !A || A && B is equivalent to !A || B.
///
// Confidence: High
// Copyright: (C) 2020 Denis Efremov ISPRAS
// Options: --no-includes --include-headers

virtual patch
virtual context
virtual org
virtual report

@r depends on !patch@
expression A, B;
position p;
@@

* !A || (A &&@p B)

@depends on patch@
expression A, B;
@@

  !A ||
-       (A && B)
+       B

@script:python depends on report@
p << r.p;
@@

coccilib.report.print_report(p[0], "WARNING !A || A && B is equivalent to !A || B")

@script:python depends on org@
p << r.p;
@@

coccilib.org.print_todo(p[0], "WARNING !A || A && B is equivalent to !A || B")

https://t.me/RX1948 - 2025