diff options
| author | Pedro Magalhães <mail@pmmaga.net> | 2018-10-05 16:38:06 +0100 |
|---|---|---|
| committer | Pedro Magalhães <mail@pmmaga.net> | 2018-10-05 16:38:06 +0100 |
| commit | 7b10e71b9d99a6000d30d0004cc56fc49264d318 (patch) | |
| tree | f8997dd711a92ef09066377709d324cb76fe0844 | |
| parent | c2c202193ae6433d09234d2e45f04e62e51deb83 (diff) | |
| download | php-git-7b10e71b9d99a6000d30d0004cc56fc49264d318.tar.gz | |
Use the locally defined constants for dns record types
| -rw-r--r-- | ext/standard/dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index a55e97c806..6b542408cd 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -355,7 +355,7 @@ PHP_FUNCTION(dns_check_record) u_char ans[MAXPACKET]; char *hostname, *rectype = NULL; size_t hostname_len, rectype_len = 0; - int type = T_MX, i; + int type = DNS_T_MX, i; #if defined(HAVE_DNS_SEARCH) struct sockaddr_storage from; uint32_t fromsize = sizeof(from); @@ -377,7 +377,7 @@ PHP_FUNCTION(dns_check_record) } if (rectype) { - if (!strcasecmp("A", rectype)) type = T_A; + if (!strcasecmp("A", rectype)) type = DNS_T_A; else if (!strcasecmp("NS", rectype)) type = DNS_T_NS; else if (!strcasecmp("MX", rectype)) type = DNS_T_MX; else if (!strcasecmp("PTR", rectype)) type = DNS_T_PTR; @@ -454,7 +454,7 @@ static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_t GETLONG(ttl, cp); GETSHORT(dlen, cp); CHECKCP(dlen); - if (type_to_fetch != T_ANY && type != type_to_fetch) { + if (type_to_fetch != DNS_T_ANY && type != type_to_fetch) { cp += dlen; return cp; } |
