[monitoring-plugins] check_dns: Use strchr instead of index

Jan Wagner git at monitoring-plugins.org
Thu Jul 31 00:10:07 CEST 2014


 Module: monitoring-plugins
 Branch: master
 Commit: b7ce241ba66298e06004236936e9915108876144
 Author: Jan Wagner <waja at cyconet.org>
   Date: Wed Jul 30 23:29:28 2014 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=b7ce241

check_dns: Use strchr instead of index

---

 plugins/check_dns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index da90da7..d7f7346 100644
--- a/plugins/check_dns.c
+++ b/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 */



More information about the Commits mailing list