diff options
author | Zeev Suraski <zeev@php.net> | 1999-05-23 20:32:19 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-05-23 20:32:19 +0000 |
commit | 0eb500cef515cbadfc58da61a80946a0221f1b4f (patch) | |
tree | 5aa1daf8c4155385defe1d73398f22645fadd120 /ext/standard/dns.c | |
parent | 57b22c8b64583c5969db69a526215db7f9facca3 (diff) | |
download | php-git-0eb500cef515cbadfc58da61a80946a0221f1b4f.tar.gz |
Thou shalt use the API, and thou shalt be safe
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r-- | ext/standard/dns.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 95d03aa208..079ac1220a 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -237,7 +237,6 @@ PHP_FUNCTION(checkdnsrr) PHP_FUNCTION(getmxrr) { pval *host, *mx_list, *weight_list; - pval tmp1,tmp2; int need_weight = 0; int count,qdc; u_short type,weight; @@ -313,14 +312,9 @@ PHP_FUNCTION(getmxrr) RETURN_FALSE; } cp += i; - tmp1.value.str.len = strlen(buf); - tmp1.value.str.val = estrndup(buf,tmp1.value.str.len); - tmp1.type = IS_STRING; - _php3_hash_next_index_insert(mx_list->value.ht, (void *)&tmp1, sizeof(pval), NULL); + add_next_index_string(mx_list, buf, 1); if ( need_weight ) { - tmp2.value.lval = (long)weight; - tmp2.type = IS_LONG; - _php3_hash_next_index_insert(weight_list->value.ht, (void *)&tmp2, sizeof(pval), NULL); + add_next_index_long(weight_list, weight); } } RETURN_TRUE; |