Patchwork [U-Boot] cmd_mem: localize state variables

login
register
mail settings
Submitter Mike Frysinger
Date Dec. 22, 2010, 2:40 p.m.
Message ID <1293028829-16057-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/76410/
State Accepted
Commit d6efe244e485d119ff4d3505d9c6fc0ddc9b4fb5
Delegated to: Wolfgang Denk
Headers show

Comments

Mike Frysinger - Dec. 22, 2010, 2:40 p.m.
These "last" variables aren't used outside of this file, so add static.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 common/cmd_mem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Wolfgang Denk - Jan. 9, 2011, 5:03 p.m.
Dear Mike Frysinger,

In message <1293028829-16057-1-git-send-email-vapier@gentoo.org> you wrote:
> These "last" variables aren't used outside of this file, so add static.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  common/cmd_mem.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index f7a442a..f03233c 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -48,9 +48,9 @@  static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
 /* Display values from last command.
  * Memory modify remembered values are different from display memory.
  */
-uint	dp_last_addr, dp_last_size;
-uint	dp_last_length = 0x40;
-uint	mm_last_addr, mm_last_size;
+static uint	dp_last_addr, dp_last_size;
+static uint	dp_last_length = 0x40;
+static uint	mm_last_addr, mm_last_size;
 
 static	ulong	base_address = 0;