Module: ngircd.git Branch: master Commit: 3a826b774a10a069d2f18b1a07842acf8da8fc49 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=3a826...
Author: Alexander Barton alex@barton.de Date: Tue Oct 5 20:16:35 2010 +0200
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 fa69ffb..9e29074 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 ea9e96b..4513a23 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