Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • X xcap-capability-linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • xcap
  • xcap-capability-linux
  • Repository
Switch branch/tag
  • xcap-capability-linux
  • drivers
  • atm
  • ambassador.c
Find file BlameHistoryPermalink
  • Alexey Dobriyan's avatar
    [ATM] ambassador,firestream: "-1 >>" is implementation defined · 5f3f24fa
    Alexey Dobriyan authored Nov 13, 2006
    
    
    6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions.
    		...
    	If E1 has a signed type and a negative value, the resulting value
    	is implementation defined.
    
    So, cast -1 to unsigned type to make result well-defined.
    
    [ Modified to use ~0U based upon recommendation from Al Viro. -DaveM ]
    Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5f3f24fa