mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Perform inconsequential code cleanup
This commit is contained in:
parent
929478c524
commit
decf216655
52 changed files with 326 additions and 442 deletions
|
@ -22,7 +22,7 @@
|
|||
#include "libc/dns/resolvconf.h"
|
||||
#include "libc/dns/servicestxt.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/sock/sock.h"
|
||||
|
@ -94,7 +94,7 @@ int getaddrinfo(const char *name, const char *service,
|
|||
return EAI_NONAME;
|
||||
} else if (ResolveHostsTxt(GetHostsTxt(), AF_INET, name, ai->ai_addr,
|
||||
sizeof(ai->ai_addr4), &canon) > 0) {
|
||||
memcpy(ai->ai_canonname, canon, min(strlen(canon), DNS_NAME_MAX) + 1);
|
||||
strlcpy(ai->ai_canonname, canon, DNS_NAME_MAX + 1);
|
||||
*res = ai;
|
||||
return 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue