summaryrefslogtreecommitdiff
path: root/ares_create_query.c
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-10 16:24:08 +0900
committerYu Jiung <jiung.yu@samsung.com>2016-11-10 16:25:02 +0900
commit8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (patch)
tree81f0750d91aa467df3ee81cf30d22a65db2e6685 /ares_create_query.c
parentccccebb78520ec3a26a18370936516b12ae5d53a (diff)
parent45e88a8337839e5fd88519bc55467053d521c9f6 (diff)
downloadc-ares-196915eb4535a755c5005b5befd9d01b72120215.tar.gz
c-ares-196915eb4535a755c5005b5befd9d01b72120215.tar.bz2
c-ares-196915eb4535a755c5005b5befd9d01b72120215.zip
Conflicts: packaging/c-ares.spec Change-Id: I1ec10e394aed3ef19ee21fefbe3aba7d7a615c74
Diffstat (limited to 'ares_create_query.c')
-rw-r--r--[-rwxr-xr-x]ares_create_query.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ares_create_query.c b/ares_create_query.c
index b9204e6..7f4c52d 100755..100644
--- a/ares_create_query.c
+++ b/ares_create_query.c
@@ -103,10 +103,10 @@ int ares_create_query(const char *name, int dnsclass, int type,
* used.
*/
len = strlen(name) + 2 + HFIXEDSZ + QFIXEDSZ +
- (max_udp_size ? EDNSFIXEDSZ : 0);
+ (max_udp_size ? EDNSFIXEDSZ : 0);
buf = ares_malloc(len);
if (!buf)
- return ARES_ENOMEM;
+ return ARES_ENOMEM;
/* Set up the header. */
q = buf;
@@ -134,7 +134,7 @@ int ares_create_query(const char *name, int dnsclass, int type,
while (*name)
{
if (*name == '.') {
- free(buf);
+ free (buf);
return ARES_EBADNAME;
}
@@ -147,7 +147,7 @@ int ares_create_query(const char *name, int dnsclass, int type,
len++;
}
if (len > MAXLABEL) {
- free(buf);
+ free (buf);
return ARES_EBADNAME;
}
@@ -180,7 +180,7 @@ int ares_create_query(const char *name, int dnsclass, int type,
q++;
DNS_RR_SET_TYPE(q, T_OPT);
DNS_RR_SET_CLASS(q, max_udp_size);
- q += (EDNSFIXEDSZ-1);
+ q += (EDNSFIXEDSZ-1);
}
buflen = (q - buf);
@@ -190,8 +190,8 @@ int ares_create_query(const char *name, int dnsclass, int type,
* to 255 octets or less."). */
if (buflen > (MAXCDNAME + HFIXEDSZ + QFIXEDSZ +
(max_udp_size ? EDNSFIXEDSZ : 0))) {
- free (buf);
- return ARES_EBADNAME;
+ free (buf);
+ return ARES_EBADNAME;
}
/* we know this fits in an int at this point */