[lttng-dev] [PATCH lttng-tools] x is never reused, no need to shift it

Jonathan Rajotte jonathan.rajotte-julien at efficios.com
Tue Jan 17 15:07:31 UTC 2017


Also remove noise in scanbuild report.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
 src/bin/lttng-sessiond/ust-metadata.c | 1 -
 src/common/compat/string.h            | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/bin/lttng-sessiond/ust-metadata.c b/src/bin/lttng-sessiond/ust-metadata.c
index c1a80c7..fb1f115 100644
--- a/src/bin/lttng-sessiond/ust-metadata.c
+++ b/src/bin/lttng-sessiond/ust-metadata.c
@@ -74,7 +74,6 @@ int fls(unsigned int x)
 		r -= 2;
 	}
 	if (!(x & 0x80000000U)) {
-		x <<= 1;
 		r -= 1;
 	}
 	return r;
diff --git a/src/common/compat/string.h b/src/common/compat/string.h
index 7c426ef..db3db80 100644
--- a/src/common/compat/string.h
+++ b/src/common/compat/string.h
@@ -117,7 +117,6 @@ static inline int lttng_fls(int val)
 		r -= 2;
 	}
 	if (!(x & 0x80000000U)) {
-		x <<= 1;
 		r -= 1;
 	}
 	return r;
-- 
2.7.4



More information about the lttng-dev mailing list