mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Fixed "'x' might be used uninitialized in this function" warning.
Removed trailing whitespace.
This commit is contained in:
parent
6296b89319
commit
ee17fba72e
@ -81,8 +81,8 @@ static char *ares_striendstr(const char *s1, const char *s2);
|
|||||||
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
|
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
|
||||||
int flags, ares_nameinfo_callback callback, void *arg)
|
int flags, ares_nameinfo_callback callback, void *arg)
|
||||||
{
|
{
|
||||||
struct sockaddr_in *addr;
|
struct sockaddr_in *addr = NULL;
|
||||||
struct sockaddr_in6 *addr6;
|
struct sockaddr_in6 *addr6 = NULL;
|
||||||
struct nameinfo_query *niquery;
|
struct nameinfo_query *niquery;
|
||||||
|
|
||||||
/* Verify the buffer size */
|
/* Verify the buffer size */
|
||||||
@ -264,11 +264,11 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
char tmpbuf[4096];
|
char tmpbuf[4096];
|
||||||
|
|
||||||
if (port)
|
if (port)
|
||||||
{
|
{
|
||||||
if (flags & ARES_NI_NUMERICSERV)
|
if (flags & ARES_NI_NUMERICSERV)
|
||||||
sep = NULL;
|
sep = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (flags & ARES_NI_UDP)
|
if (flags & ARES_NI_UDP)
|
||||||
proto = "udp";
|
proto = "udp";
|
||||||
else if (flags & ARES_NI_SCTP)
|
else if (flags & ARES_NI_SCTP)
|
||||||
@ -288,15 +288,15 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
#elif GETSERVBYPORT_R_ARGS == 4
|
#elif GETSERVBYPORT_R_ARGS == 4
|
||||||
if (getservbyport_r(port, proto, &se, (void *)tmpbuf) != 0)
|
if (getservbyport_r(port, proto, &se, (void *)tmpbuf) != 0)
|
||||||
sep = NULL;
|
sep = NULL;
|
||||||
#else
|
#else
|
||||||
/* Lets just hope the OS uses TLS! */
|
/* Lets just hope the OS uses TLS! */
|
||||||
sep = getservbyport(port, proto);
|
sep = getservbyport(port, proto);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* Lets just hope the OS uses TLS! */
|
/* Lets just hope the OS uses TLS! */
|
||||||
sep = getservbyport(port, proto);
|
sep = getservbyport(port, proto);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (sep && sep->s_name)
|
if (sep && sep->s_name)
|
||||||
/* get service name */
|
/* get service name */
|
||||||
strcpy(tmpbuf, sep->s_name);
|
strcpy(tmpbuf, sep->s_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user