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

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
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.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.