]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: wget: Fix comparison of unsigned variable
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 8 Jul 2025 16:51:18 +0000 (17:51 +0100)
committerJerome Forissier <jerome.forissier@linaro.org>
Fri, 1 Aug 2025 07:30:47 +0000 (09:30 +0200)
commit9104267e676bfe254f742b56329e7c3442a2b144
tree349ccd73477064378c4f7c334f9c045e7829ea6d
parentc29c5ed2966425a14aab6794e739a78ab46178a5
net: wget: Fix comparison of unsigned variable

content_length is an unsigned long and so testing that it is >= 0 will
always be true. Instead test that it is != -1 as that is the condition
set on error.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
net/wget.c