From: Andrew Goodbody Date: Thu, 26 Jun 2025 14:12:58 +0000 (+0100) Subject: cmd: ufetch: Initialise size before first use X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8830e72092e07e4439835ed07efefff91aede67e;p=thirdparty%2Fu-boot.git 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. Fixes: 86d462c05d57 (cmd: add a fetch utility) Signed-off-by: Andrew Goodbody Reviewed-by: Casey Connolly Reviewed-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20250626-ufetch_fix-v1-1-025afdb85dc2@linaro.org Signed-off-by: Casey Connolly --- diff --git a/cmd/ufetch.c b/cmd/ufetch.c index 46bd16824e6..bc5db08eee1 100644 --- a/cmd/ufetch.c +++ b/cmd/ufetch.c @@ -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;