tidy-up: C and CI

- drop redundant casts for `CURL_UNCONST()` pointers (Windows).
- GHA/linux: delete redundant/dupe `-g` C flag in memory sanitizer job.
  Spotted-by: Daniel Stenberg
- examples/http2-upload: drop local macro.
- examples/http2-upload: drop leading underscore from union name.
- examples/http2-upload: drop interim macro.
- tests/server/util: reapply patch lost in a rebase.
- sync `main()` declarations across the codebase.

Closes #22559
This commit is contained in:
Viktor Szakats 2026-08-03 02:28:33 +02:00
parent 35843dd635
commit 8a8ff47b63
No known key found for this signature in database
37 changed files with 59 additions and 68 deletions

View file

@ -25,7 +25,7 @@
#include <stdio.h>
int main(int argc, const char **argv)
int main(int argc, const char *argv[])
{
entry_func_t entry_func;
const char *entry_name;

View file

@ -1097,13 +1097,11 @@ int open_stream_sock(curl_socket_t *psock, uint16_t *pport)
srvr_sockaddr_union_t localaddr;
memset(&localaddr, 0, sizeof(localaddr));
#ifdef USE_IPV6
if(socket_domain != AF_INET6)
if(socket_domain == AF_INET6)
la_size = sizeof(localaddr.sa6);
else
#endif
la_size = sizeof(localaddr.sa4);
#ifdef USE_IPV6
else
la_size = sizeof(localaddr.sa6);
#endif
if(getsockname(sock, &localaddr.sa, &la_size) < 0) {
sockerr = SOCKERRNO;
logmsg("getsockname() failed with error (%d) %s",