Explorar o código

check_dns: Use strchr instead of index

Jan Wagner %!s(int64=12) %!d(string=hai) anos
pai
achega
b7ce241ba6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/check_dns.c

+ 1 - 1
plugins/check_dns.c

@@ -139,7 +139,7 @@ main (int argc, char **argv)
     /* bug ID: 2946553 - Older versions of bind will use all available dns 
                          servers, we have to match the one specified */
     if (strstr (chld_out.line[i], "Server:") && strlen(dns_server) > 0) {
-      temp_buffer = index (chld_out.line[i], ':');
+      temp_buffer = strchr (chld_out.line[i], ':');
       temp_buffer++;
 
       /* Strip leading tabs */