Cleanup: Unnecessary bit shift
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 21 Sep 2015 18:31:33 +0000 (14:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 21 Sep 2015 18:43:12 +0000 (14:43 -0400)
Reported by cppcheck [1].

[1]
https://ci.lttng.org/view/Code%20quality/job/lttng-ust_master_cppcheck/5/cppcheckResult/source.10/

Proposed-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/backend_internal.h

index 344784feccde9e5cb042175216840c46ba1aa57d..79f8bdeaea9ad933f4956f6eaf641be8416b092c 100644 (file)
@@ -485,7 +485,7 @@ static inline int lttng_ust_fls(unsigned int x)
                r -= 2;
        }
        if (!(x & 0x80000000U)) {
-               x <<= 1;
+               /* No need to bit shift on last operation */
                r -= 1;
        }
        return r;
This page took 0.025355 seconds and 5 git commands to generate.