summaryrefslogtreecommitdiff
path: root/ext/standard/dns.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-12-05 22:28:02 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-12-05 22:28:02 +0000
commitc668055159a2be33a99f01d93235229468aa3783 (patch)
treebd2c617c59a2ac46fe2aac196070773c0dcfc9ca /ext/standard/dns.c
parent4ce4a1c32cc1c5156edcab52fb9aa81e236edcf0 (diff)
downloadphp-git-c668055159a2be33a99f01d93235229468aa3783.tar.gz
Remove pointless checks for array_init() return values.
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r--ext/standard/dns.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index cd55fb3618..2f68defa95 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -173,9 +173,7 @@ PHP_FUNCTION(gethostbynamel)
}
convert_to_string_ex(arg);
- if (array_init(return_value) == FAILURE) {
- RETURN_FALSE;
- }
+ array_init(return_value);
hp = gethostbyname(Z_STRVAL_PP(arg));
if (hp == NULL || hp->h_addr_list == NULL) {
@@ -343,9 +341,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
}
MAKE_STD_ZVAL(*subarray);
- if (array_init(*subarray) != SUCCESS) {
- return NULL;
- }
+ array_init(*subarray);
add_assoc_string(*subarray, "host", name, 1);
switch (type) {
@@ -466,13 +462,9 @@ PHP_FUNCTION(dns_get_record)
type_param = Z_LVAL_P(fetch_type);
pval_destructor(authns);
addtl_recs = 1; /* We want the additional Records */
- if (array_init(authns) != SUCCESS) {
- RETURN_FALSE;
- }
+ array_init(authns);
pval_destructor(addtl);
- if (array_init(addtl) != SUCCESS) {
- RETURN_FALSE;
- }
+ array_init(addtl);
break;
default:
WRONG_PARAM_COUNT;
@@ -486,9 +478,7 @@ PHP_FUNCTION(dns_get_record)
}
/* Initialize the return array */
- if (array_init(return_value) != SUCCESS) {
- RETURN_FALSE;
- }
+ array_init(return_value);
/* - We emulate an or'ed type mask by querying type by type. (Steps 0 - 7)
* If additional info is wanted we check again with T_ANY (step 8/9)
@@ -627,9 +617,7 @@ PHP_FUNCTION(dns_get_mx)
}
need_weight = 1;
pval_destructor(weight_list); /* start with clean array */
- if (array_init(weight_list) == FAILURE) {
- RETURN_FALSE;
- }
+ array_init(weight_list);
break;
default:
@@ -638,9 +626,7 @@ PHP_FUNCTION(dns_get_mx)
convert_to_string(host);
pval_destructor(mx_list); /* start with clean array */
- if (array_init(mx_list) == FAILURE ) {
- RETURN_FALSE;
- }
+ array_init(mx_list);
/* Go! */
i = res_search(Z_STRVAL_P(host), C_IN, T_MX, (u_char *)&ans, sizeof(ans));