1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

More compiler warning cleanups

This commit is contained in:
Dominick Meglio 2005-05-17 04:18:41 +00:00
parent 1e51c3a832
commit 6a35cb60fd

View File

@ -22,6 +22,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netdb.h> #include <netdb.h>
#include <arpa/inet.h>
#include <arpa/nameser.h> #include <arpa/nameser.h>
#ifdef HAVE_ARPA_NAMESER_COMPAT_H #ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h> #include <arpa/nameser_compat.h>
@ -32,6 +33,10 @@
#include <net/if.h> #include <net/if.h>
#endif #endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -250,7 +255,7 @@ static char *lookup_service(unsigned short port, int flags, char *buf)
else else
{ {
struct servent *se; struct servent *se;
char *proto; const char *proto;
if (flags & ARES_NI_UDP) if (flags & ARES_NI_UDP)
proto = "udp"; proto = "udp";
@ -319,7 +324,7 @@ static char *ares_striendstr(const char *s1, const char *s2)
c2++; c2++;
} }
} }
if (c2 == c1 == NULL) if (c2 == c1 && c2 == NULL)
return (char *)c1_begin; return (char *)c1_begin;
return NULL; return NULL;
} }