[PATCH 07/12] common: memsize: eliminate dead store
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Sep 30 03:20:00 EDT 2020
The assignment to val at this location serves no purpose, drop it to
reduce clutter.
Reported-by: clang-analyzer-10
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/memsize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/memsize.c b/common/memsize.c
index 915ab87b340a..2fd2b7145759 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -58,7 +58,7 @@ long get_ram_size(volatile long *base, long maxsize)
*addr = 0;
sync ();
- if ((val = *addr) != 0) {
+ if (*addr != 0) {
/* Restore the original data before leaving the function.
*/
sync ();
--
2.28.0
More information about the barebox
mailing list