From: Adriano Cordova <adrianox@gmail.com>
To: u-boot@lists.denx.de
Cc: joe.hershberger@ni.com, rfried.dev@gmail.com,
jerome.forissier@linaro.org, xypron.glpk@gmx.de,
Adriano Cordova <adrianox@gmail.com>
Subject: [PATCH 5/7] net: wget: make wget_with_dns return value compatible with its lwip version
Date: Wed, 6 Nov 2024 10:04:11 -0300 [thread overview]
Message-ID: <20241106130411.211160-1-adrianox@gmail.com> (raw)
There are two wget_with_dns functions, one in the legacy network
stack and one in lwip, but the return values are not compatible.
This commit modifies the legacy version of wget_with_dns so that
the return values are compatible: 0 on success, otherwise a negative
error. This way wget_with_dns can be called in a network stack
agnostic way.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
---
net/wget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wget.c b/net/wget.c
index 24be0a4932..6cf721070b 100644
--- a/net/wget.c
+++ b/net/wget.c
@@ -576,7 +576,7 @@ int wget_with_dns(ulong dst_addr, char *uri)
out:
free(str_copy);
- return ret;
+ return ret < 0 ? ret : 0;
}
#endif
--
2.43.0
next reply other threads:[~2024-11-06 14:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 13:04 Adriano Cordova [this message]
2024-11-08 17:32 ` [PATCH 5/7] net: wget: make wget_with_dns return value compatible with its lwip version Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241106130411.211160-1-adrianox@gmail.com \
--to=adrianox@gmail.com \
--cc=jerome.forissier@linaro.org \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox