Fixed compilation with mariadb-10.2
[exim.git] / src / src / lookups / dnsdb.c
index d2ae0aefc8708ad963b4650774980046ebe09569..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