* [U-Boot] [PATCH] env_sf: remove warning introduced with last patch
@ 2010-10-28 10:39 Stefano Babic
2010-10-28 17:47 ` Mike Frysinger
2010-10-29 9:49 ` [U-Boot] [PATCH V2] " Stefano Babic
0 siblings, 2 replies; 5+ messages in thread
From: Stefano Babic @ 2010-10-28 10:39 UTC (permalink / raw)
To: u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
common/env_sf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/env_sf.c b/common/env_sf.c
index a597b24..e5e0166 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -272,7 +272,7 @@ int saveenv(void)
u32 saved_size, saved_offset;
char *saved_buffer = NULL;
u32 sector = 1;
- int ret;
+ int ret = 1;
env_t env_new;
char *res;
ssize_t len;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] env_sf: remove warning introduced with last patch
2010-10-28 10:39 [U-Boot] [PATCH] env_sf: remove warning introduced with last patch Stefano Babic
@ 2010-10-28 17:47 ` Mike Frysinger
2010-10-29 9:14 ` Stefano Babic
2010-10-29 9:49 ` [U-Boot] [PATCH V2] " Stefano Babic
1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-10-28 17:47 UTC (permalink / raw)
To: u-boot
On Thu, Oct 28, 2010 at 6:39 AM, Stefano Babic wrote:
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> ---
> ?common/env_sf.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/common/env_sf.c b/common/env_sf.c
> index a597b24..e5e0166 100644
> --- a/common/env_sf.c
> +++ b/common/env_sf.c
> @@ -272,7 +272,7 @@ int saveenv(void)
> ? ? ? ?u32 saved_size, saved_offset;
> ? ? ? ?char *saved_buffer = NULL;
> ? ? ? ?u32 sector = 1;
> - ? ? ? int ret;
> + ? ? ? int ret = 1;
> ? ? ? ?env_t ? env_new;
> ? ? ? ?char ? ?*res;
> ? ? ? ?ssize_t len;
if you're going to start at 1, shouldnt you then drop the redundant
assignment to 1 ?
if (!saved_buffer) {
ret = 1;
goto done;
}
-mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] env_sf: remove warning introduced with last patch
2010-10-28 17:47 ` Mike Frysinger
@ 2010-10-29 9:14 ` Stefano Babic
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2010-10-29 9:14 UTC (permalink / raw)
To: u-boot
On 10/28/2010 07:47 PM, Mike Frysinger wrote:
> if you're going to start at 1, shouldnt you then drop the redundant
> assignment to 1 ?
> if (!saved_buffer) {
> ret = 1;
> goto done;
> }
> -mike
>
Yes, it is redundant - I'll drop it.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH V2] env_sf: remove warning introduced with last patch
2010-10-28 10:39 [U-Boot] [PATCH] env_sf: remove warning introduced with last patch Stefano Babic
2010-10-28 17:47 ` Mike Frysinger
@ 2010-10-29 9:49 ` Stefano Babic
2010-10-29 21:08 ` Wolfgang Denk
1 sibling, 1 reply; 5+ messages in thread
From: Stefano Babic @ 2010-10-29 9:49 UTC (permalink / raw)
To: u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
common/env_sf.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/common/env_sf.c b/common/env_sf.c
index a597b24..47c6a70 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -272,7 +272,7 @@ int saveenv(void)
u32 saved_size, saved_offset;
char *saved_buffer = NULL;
u32 sector = 1;
- int ret;
+ int ret = 1;
env_t env_new;
char *res;
ssize_t len;
@@ -293,7 +293,6 @@ int saveenv(void)
saved_offset = CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE;
saved_buffer = malloc(saved_size);
if (!saved_buffer) {
- ret = 1;
goto done;
}
ret = spi_flash_read(env_flash, saved_offset,
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH V2] env_sf: remove warning introduced with last patch
2010-10-29 9:49 ` [U-Boot] [PATCH V2] " Stefano Babic
@ 2010-10-29 21:08 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2010-10-29 21:08 UTC (permalink / raw)
To: u-boot
Dear Stefano Babic,
In message <1288345785-18990-1-git-send-email-sbabic@denx.de> you wrote:
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> ---
> common/env_sf.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never call a man a fool. Borrow from him.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-29 21:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 10:39 [U-Boot] [PATCH] env_sf: remove warning introduced with last patch Stefano Babic
2010-10-28 17:47 ` Mike Frysinger
2010-10-29 9:14 ` Stefano Babic
2010-10-29 9:49 ` [U-Boot] [PATCH V2] " Stefano Babic
2010-10-29 21:08 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.