X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fdnsdb.c;h=c4b5b53eca41e2e0a7be6b42157d2c879dac1afc;hb=9be4572b6242b4d297f8b030bdd54bd345a72c06;hp=d2ae0aefc8708ad963b4650774980046ebe09569;hpb=d093f8e514d0e914bae3dc34b4e4f0a51720c690;p=exim.git diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index d2ae0aefc..c4b5b53ec 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;