summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-30 09:20:00 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-02 06:00:12 +0200
commit4be6895a0512e284611054ff39932f768f9a50a4 (patch)
treeada7651531e8446413175ecaca1af4ef71d41d05 /common
parentc27b18eaaf675f2f96b41c1b92fe00ee3940de4d (diff)
downloadbarebox-4be6895a0512e284611054ff39932f768f9a50a4.tar.gz
barebox-4be6895a0512e284611054ff39932f768f9a50a4.tar.xz
common: memsize: eliminate dead store
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/memsize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/memsize.c b/common/memsize.c
index 915ab87b34..2fd2b71457 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 ();