X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Flookups%2Fdnsdb.c;h=bf3acd6ef03d3d1ce0cb8a39d153949d217542b7;hb=5903c6ff59527362e869fedb565c56935ce8dd68;hp=d2ae0aefc8708ad963b4650774980046ebe09569;hpb=4c04137d73637107669e02b21f890387aaa2ef34;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index d2ae0aefc..bf3acd6ef 100644 --- a/src/src/lookups/dnsdb.c +++ b/src/src/lookups/dnsdb.c @@ -261,17 +261,15 @@ if ((equals = Ustrchr(keystring, '=')) != NULL) while (tend > keystring && isspace(tend[-1])) tend--; len = tend - keystring; - for (i = 0; i < sizeof(type_names)/sizeof(uschar *); i++) - { + for (i = 0; i < nelem(type_names); i++) if (len == Ustrlen(type_names[i]) && strncmpic(keystring, US type_names[i], len) == 0) { type = type_values[i]; break; } - } - if (i >= sizeof(type_names)/sizeof(uschar *)) + if (i >= nelem(type_names)) { *errmsg = US"unsupported DNS record type"; return DEFER; @@ -412,7 +410,7 @@ while ((domain = string_nextinlist(&keystring, &sep, NULL, 0))) if (outsep2 == NULL) { /* output only the first item of data */ - yield = string_catn(yield, &size, &ptr, (uschar *)(rr->data+1), + yield = string_catn(yield, &size, &ptr, US (rr->data+1), (rr->data)[0]); } else