From: Jonathan Rajotte Date: Mon, 21 Sep 2015 18:31:33 +0000 (-0400) Subject: Cleanup: Unnecessary bit shift X-Git-Tag: v2.7.0~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=36df551a3a6d369d06321dd2ba7ac44d9b6b8d4e;p=lttng-ust.git Cleanup: Unnecessary bit shift 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 Signed-off-by: Jonathan Rajotte Signed-off-by: Mathieu Desnoyers --- diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h index 344784fe..79f8bdea 100644 --- a/libringbuffer/backend_internal.h +++ b/libringbuffer/backend_internal.h @@ -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;