summaryrefslogtreecommitdiff
path: root/adig.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-13 13:53:57 +0000
committerYang Tse <yangsita@gmail.com>2009-10-13 13:53:57 +0000
commit58346cbfb99ff558185864f30260166b4b8921f4 (patch)
tree3d1df95f17eb5df81546f5e4fb7789813edd35c9 /adig.c
parente804725e7535dfe1dbb45ae560e800a2e242084f (diff)
downloadc-ares-58346cbfb99ff558185864f30260166b4b8921f4.tar.gz
c-ares-58346cbfb99ff558185864f30260166b4b8921f4.tar.bz2
c-ares-58346cbfb99ff558185864f30260166b4b8921f4.zip
Fix compiler warning: argument is incompatible with corresponding format string conversion
Diffstat (limited to 'adig.c')
-rw-r--r--adig.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/adig.c b/adig.c
index 9a3922d..3a5c3da 100644
--- a/adig.c
+++ b/adig.c
@@ -551,12 +551,20 @@ static const unsigned char *display_rr(const unsigned char *aptr,
len = *p;
if (p + len + 1 > aptr + dlen)
return NULL;
- printf("\t%.*s", (int)len, p + 1);
- p += len + 1;
+ status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t%s", name.as_char);
+ ares_free_string(name.as_char);
+ p += len;
len = *p;
if (p + len + 1 > aptr + dlen)
return NULL;
- printf("\t%.*s", (int)len, p + 1);
+ status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t%s", name.as_char);
+ ares_free_string(name.as_char);
break;
case T_MINFO:
@@ -623,8 +631,12 @@ static const unsigned char *display_rr(const unsigned char *aptr,
len = *p;
if (p + len + 1 > aptr + dlen)
return NULL;
- printf("\t%.*s", (int)len, p + 1);
- p += len + 1;
+ status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t%s", name.as_char);
+ ares_free_string(name.as_char);
+ p += len;
}
break;