diff options
author | Haru <haru@dotalux.com> | 2014-07-10 16:59:55 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-07-11 08:47:27 +0200 |
commit | 68e7f53f05dd80e8b4ab9d84c9931df22a6b060c (patch) | |
tree | 5b3d0f0b2f7aad19735b16c8a443a9534d0f5224 /src/common/showmsg.c | |
parent | 8b4f35532c8fd7c7f0939756923fdaf14ee39531 (diff) | |
download | hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.gz hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.bz2 hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.xz hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.zip |
Fixed reserved __identifier violations
- Complies with CERT DCL37-C
- Fixes issue #293 (special thanks to elfring)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/showmsg.c')
-rw-r--r-- | src/common/showmsg.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c index ece10c1a8..b9bcef9b2 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -654,7 +654,7 @@ int FPRINTF(FILE *file, const char *fmt, ...) char timestamp_format[20] = ""; //For displaying Timestamps -int _vShowMessage(enum msg_type flag, const char *string, va_list ap) +int vShowMessage_(enum msg_type flag, const char *string, va_list ap) { va_list apcopy; char prefix[100]; @@ -663,7 +663,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap) #endif if (!string || *string == '\0') { - ShowError("Empty string passed to _vShowMessage().\n"); + ShowError("Empty string passed to vShowMessage_().\n"); return 1; } if( @@ -734,7 +734,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap) strcat(prefix,CL_RED"[Fatal Error]"CL_RESET":"); break; default: - ShowError("In function _vShowMessage() -> Invalid flag passed.\n"); + ShowError("In function vShowMessage_() -> Invalid flag passed.\n"); return 1; } @@ -782,12 +782,12 @@ void ClearScreen(void) ShowMessage(CL_CLS); // to prevent empty string passed messages #endif } -int _ShowMessage(enum msg_type flag, const char *string, ...) +int ShowMessage_(enum msg_type flag, const char *string, ...) { int ret; va_list ap; va_start(ap, string); - ret = _vShowMessage(flag, string, ap); + ret = vShowMessage_(flag, string, ap); va_end(ap); return ret; } @@ -796,37 +796,37 @@ int _ShowMessage(enum msg_type flag, const char *string, ...) void ShowMessage(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_NONE, string, ap); + vShowMessage_(MSG_NONE, string, ap); va_end(ap); } void ShowStatus(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_STATUS, string, ap); + vShowMessage_(MSG_STATUS, string, ap); va_end(ap); } void ShowSQL(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_SQL, string, ap); + vShowMessage_(MSG_SQL, string, ap); va_end(ap); } void ShowInfo(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_INFORMATION, string, ap); + vShowMessage_(MSG_INFORMATION, string, ap); va_end(ap); } void ShowNotice(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_NOTICE, string, ap); + vShowMessage_(MSG_NOTICE, string, ap); va_end(ap); } void ShowWarning(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_WARNING, string, ap); + vShowMessage_(MSG_WARNING, string, ap); va_end(ap); } void ShowConfigWarning(config_setting_t *config, const char *string, ...) @@ -837,25 +837,25 @@ void ShowConfigWarning(config_setting_t *config, const char *string, ...) StrBuf->AppendStr(&buf, string); StrBuf->Printf(&buf, " (%s:%d)\n", config_setting_source_file(config), config_setting_source_line(config)); va_start(ap, string); - _vShowMessage(MSG_WARNING, StrBuf->Value(&buf), ap); + vShowMessage_(MSG_WARNING, StrBuf->Value(&buf), ap); va_end(ap); StrBuf->Destroy(&buf); } void ShowDebug(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_DEBUG, string, ap); + vShowMessage_(MSG_DEBUG, string, ap); va_end(ap); } void ShowError(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_ERROR, string, ap); + vShowMessage_(MSG_ERROR, string, ap); va_end(ap); } void ShowFatalError(const char *string, ...) { va_list ap; va_start(ap, string); - _vShowMessage(MSG_FATALERROR, string, ap); + vShowMessage_(MSG_FATALERROR, string, ap); va_end(ap); } |