Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jul 2018 19:57:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229548] src/sys/dev/ath/if_ath.c:2154: wierd expression ?
Message-ID:  <bug-229548-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229548

            Bug ID: 229548
           Summary: src/sys/dev/ath/if_ath.c:2154: wierd expression ?
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dcb314@hotmail.com

src/sys/dev/ath/if_ath.c:2154]: (error) Signed integer overflow for expression
'i<<i'.

Source code is

                for (i = 0; i < 32; i++)
                        if (ah->ah_syncstate & (i << i))

Maybe better code

                for (i = 0; i < 32; i++)
                        if (ah->ah_syncstate & (1 << i))

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229548-227>