From 3a826b774a10a069d2f18b1a07842acf8da8fc49 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 5 Oct 2010 20:16:35 +0200 Subject: [PATCH] const'ify ngt_SyslogFacilityName() function This fixes the following gcc compiler warning: tool.c: In function 'ngt_SyslogFacilityName': tool.c:195: warning: return discards qualifiers from pointer target type --- src/tool/tool.c | 2 +- src/tool/tool.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tool/tool.c b/src/tool/tool.c index fa69ffb1..9e290749 100644 --- a/src/tool/tool.c +++ b/src/tool/tool.c @@ -186,7 +186,7 @@ CODE facilitynames[] = { #endif -GLOBAL char +GLOBAL const char *ngt_SyslogFacilityName(int Facility) { int i = 0; diff --git a/src/tool/tool.h b/src/tool/tool.h index ea9e96b9..4513a232 100644 --- a/src/tool/tool.h +++ b/src/tool/tool.h @@ -30,7 +30,7 @@ GLOBAL char *ngt_UpperStr PARAMS((char *String )); GLOBAL char *ngt_LowerStr PARAMS((char *String )); #ifdef SYSLOG -GLOBAL char *ngt_SyslogFacilityName PARAMS((int Facility)); +GLOBAL const char *ngt_SyslogFacilityName PARAMS((int Facility)); GLOBAL int ngt_SyslogFacilityID PARAMS((char *Name, int DefaultFacility)); #endif -- 2.39.2