cmd: ufetch: Initialise size before first use
PATCH 1/1 cmd: ufetch: Initialise size before first use
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
--- cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/ufetch.c +1 -1
@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,const char *model, *compatible;char *ipaddr;int n_cmds, n_cpus =0 , compatlen; -size_t size; +size_t size =0 ;ofnode np;bool skip_ascii = false;
---
base-commit: 903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142
Best regards,
Signature · 1 line
Andrew Goodbody <[email protected]>
Quoted 7 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>
Quoted 23 lines
--- cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-2@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,const char *model, *compatible;char *ipaddr;int n_cmds, n_cpus =0 , compatlen; -size_t size; +size_t size =0 ;ofnode np;bool skip_ascii = false; ---base-commit:
903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,
Quoted 9 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>---
Quoted 25 lines
cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-2@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,const char *model, *compatible;char *ipaddr;int n_cmds, n_cpus =0 , compatlen; -size_t size; +size_t size =0 ;ofnode np;bool skip_ascii = false; ---base-commit:
903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,
--
Andrew Goodbody <[email protected]>
Quoted 7 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>
Quoted 23 lines
--- cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-2@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,const char *model, *compatible;char *ipaddr;int n_cmds, n_cpus =0 , compatlen; -size_t size; +size_t size =0 ;ofnode np;bool skip_ascii = false; ---base-commit:
903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,
Signature · 1 line
Casey (she/they)
ping?
Quoted 30 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>--- cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-2@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,const char *model, *compatible;char *ipaddr;int n_cmds, n_cpus =0 , compatlen; -size_t size; +size_t size =0 ;ofnode np;bool skip_ascii = false; ---base-commit:
903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,
Hi Andrew,
Sorry I missed the thank you letter for this one. This patch was picked as 8830e72092e0
Kind regards,
Quoted 34 lines · Andrew Goodbody
ping?
Quoted 30 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>---
cmd/ufetch.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-1@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, const char *model, *compatible; char *ipaddr; int n_cmds, n_cpus = 0, compatlen; - size_t size; + size_t size = 0; ofnode np; bool skip_ascii = false;
---
base-commit:903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,
Signature · 1 line
// Casey (she/her)
Thanks Casey. It is just that this patch still shows as 'New' in patchwork rather than 'Accepted'.
Andrew
Quoted 43 lines · Casey Connolly
Hi Andrew,
Sorry I missed the thank you letter for this one. This patch was picked as
8830e72092e0Kind regards,
Quoted 34 lines · Andrew Goodbody
ping?
Quoted 30 lines · Andrew Goodbody
The local variable size is not assigned to before it is used for the first time. Correct this.
This issue was found by Smatch.
Fixes 86d462c05d57 (cmd: add a fetch utility)Signed-off-by Andrew Goodbody <[email protected]>--- cmd/ufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/ufetch.c +1
-2@@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, const char *model, *compatible; char *ipaddr; int n_cmds, n_cpus = 0, compatlen; - size_t size; + size_t size = 0; ofnode np; bool skip_ascii = false; ---base-commit:
903eb123236ccbd8ef05d43507a2a910b785bd56
change-id: 20250626-ufetch_fix-54b741710142Best regards,