diff options
| author | Adriano Cordova <[email protected]> | 2024-11-11 18:08:59 -0300 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-11-16 21:35:05 +0100 |
| commit | de28a2a5f2ad93b156b39c2aee24cb5d01c7e619 (patch) | |
| tree | 50ed2fe26b25f327ec9a03e78bdc7ab97b0fe3e9 /net | |
| parent | 2dd076a9c1b4137f0a48e84596fa29da2e957858 (diff) | |
net: wget: make wget_with_dns return value compatible with its lwip version
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 <[email protected]>
Diffstat (limited to 'net')
| -rw-r--r-- | net/wget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wget.c b/net/wget.c index 21f18758664..3bc2522cde5 100644 --- a/net/wget.c +++ b/net/wget.c @@ -579,7 +579,7 @@ int wget_with_dns(ulong dst_addr, char *uri) out: free(str_copy); - return ret; + return ret < 0 ? ret : 0; } #endif |
