From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Mon, 21 Sep 2015 18:44:45 +0000 (UTC) Subject: [lttng-dev] [PATCH lttng-ust] Unnecessary bit shit In-Reply-To: <1442860293-20922-1-git-send-email-jonathan.rajotte-julien@efficios.com> References: <1442860293-20922-1-git-send-email-jonathan.rajotte-julien@efficios.com> Message-ID: <1806250118.12750.1442861085910.JavaMail.zimbra@efficios.com> Merged, with title edit. ;-) Thanks, Mathieu ----- On Sep 21, 2015, at 2:31 PM, Jonathan Rajotte jonathan.rajotte-julien at efficios.com wrote: > 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 > --- > libringbuffer/backend_internal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h > index 344784f..79f8bde 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; > -- > 2.1.4 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com