[Nagiosplug-checkins] SF.net SVN: nagiosplug: [1894] nagiosplug/trunk/plugins-root/check_icmp.c

hweiss at users.sourceforge.net hweiss at users.sourceforge.net
Tue Jan 8 02:40:21 CET 2008


Revision: 1894
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1894&view=rev
Author:   hweiss
Date:     2008-01-07 17:40:21 -0800 (Mon, 07 Jan 2008)

Log Message:
-----------
Mark some constant strings "const".

Modified Paths:
--------------
    nagiosplug/trunk/plugins-root/check_icmp.c

Modified: nagiosplug/trunk/plugins-root/check_icmp.c
===================================================================
--- nagiosplug/trunk/plugins-root/check_icmp.c	2008-01-07 02:04:17 UTC (rev 1893)
+++ nagiosplug/trunk/plugins-root/check_icmp.c	2008-01-08 01:40:21 UTC (rev 1894)
@@ -242,10 +242,10 @@
 }
 
 
-static char *
+static const char *
 get_icmp_error_msg(unsigned char icmp_type, unsigned char icmp_code)
 {
-	char *msg = "unreachable";
+	const char *msg = "unreachable";
 
 	if(debug > 1) printf("get_icmp_error_msg(%u, %u)\n", icmp_type, icmp_code);
 	switch(icmp_type) {
@@ -897,7 +897,7 @@
 	unsigned char pl;
 	double rta;
 	struct rta_host *host;
-	char *status_string[] =
+	const char *status_string[] =
 	{"OK", "WARNING", "CRITICAL", "UNKNOWN", "DEPENDENT"};
 	int hosts_ok = 0;
 	int hosts_warn = 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list