env_sf: remove warning introduced with last patch
PATCH 1/1 env_sf: remove warning introduced with last patch
Signed-off-by Stefano Babic <[email protected]>
--- common/env_sf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/env_sf.c +1 -1
@@ -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;
Signature · 1 line
1.7.1
PATCH 1/1 env_sf: remove warning introduced with last patch
Quoted 10 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>---
?common/env_sf.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)common/env_sf.c +0
-0
common/env_sf.c int saveenv(void) · line 278
Quoted 8 lines
common/env_sf.c +1
-1@@ -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
PATCH 1/1 env_sf: remove warning introduced with last patch
Quoted 8 lines · Mike Frysinger
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
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH v2 1/1 env_sf: remove warning introduced with last patch
In reply to Stefano BabicSigned-off-by Stefano Babic <[email protected]>
--- common/env_sf.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
common/env_sf.c +1 -2
@@ -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,
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 1/1 env_sf: remove warning introduced with last patch
Dear Stefano Babic,
Quoted 4 lines · In message <[email protected]> you wrote:
Signed-off-by Stefano Babic <[email protected]>--- common/env_sf.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
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.