Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe
  • Repository
  • ipipe
  • drivers
  • char
  • isicom.c
Find file Blame History Permalink
  • Julia Lawall's avatar
    drivers/char/isicom.c: correct use of ! and & · 07fb6f26
    Julia Lawall authored Mar 04, 2008
    In commit e6bafba5 ("wmi: (!x & y)
    strikes again"), a bug was fixed that involved converting !x & y to !(x
    & y).  The code below shows the same pattern, and thus should perhaps be
    fixed in the same way.
    
    This is not tested and clearly changes the semantics, so it is only
    something to consider.
    
    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/
    
    )
    
    // <smpl>
    @@ expression E1,E2; @@
    (
      !E1 & !E2
    |
    - !E1 & E2
    + !(E1 & E2)
    )
    // </smpl>
    
    Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
    Cc: Jiri Slaby <jirislaby@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    07fb6f26

Imprint & Privacy Policy