From: Holger Weiss Date: Tue, 8 Jan 2008 01:40:21 +0000 (+0000) Subject: Mark some constant strings "const". X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aa215f26d9617c9c63f82ab690641fa99f1471b1;p=nagiosplug.git Mark some constant strings "const". git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1894 f882894a-f735-0410-b71e-b25c423dba1c --- diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 1ddc756..700fe8b 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -242,10 +242,10 @@ crash(const char *fmt, ...) } -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 @@ finish(int sig) 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;