tidying
[exim.git] / src / src / lookups / dnsdb.c
index da3495beb581c3d9aab5a926a29e357e7a3fd94e..bf3acd6ef03d3d1ce0cb8a39d153949d217542b7 100644 (file)
@@ -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
@@ -558,7 +556,7 @@ while ((domain = string_nextinlist(&keystring, &sep, NULL, 0)))
         }
       }    /* Loop for list of returned records */
 
-           /* Loop for set of A-lookupu types */
+           /* Loop for set of A-lookup types */
     } while (type == T_ADDRESSES && searchtype != T_A);
 
   }        /* Loop for list of domains */