1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 14:59:30 +00:00

ares_getnameinfo: fix two compiler warnings

This commit is contained in:
Yang Tse
2010-11-16 19:08:07 +01:00
parent 137a440a36
commit 690f9a726c

View File

@ -232,7 +232,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts,
char buf[255];
char *domain;
gethostname(buf, 255);
if ((domain = strchr(buf, '.')))
if ((domain = strchr(buf, '.')) != NULL)
{
char *end = ares_striendstr(host->h_name, domain);
if (end)
@ -356,11 +356,11 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int flags,
#ifdef HAVE_IF_INDEXTONAME
int is_ll, is_mcll;
#endif
char fmt_u[] = "%u";
char fmt_lu[] = "%lu";
static const char fmt_u[] = "%u";
static const char fmt_lu[] = "%lu";
char tmpbuf[IF_NAMESIZE + 2];
size_t bufl;
char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?
const char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?
fmt_lu:fmt_u;
tmpbuf[0] = '%';