From df1494d7585660ac34bdda6118420ea7e939e7bf Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Thu, 3 Dec 2015 11:00:45 +0200 Subject: [PATCH] Ticket 42. 'DOTCONF++:' removed, 'file' changed to 'File' in the snprintf() third parameter in if(lineNum) construction of error() function. The third parameter changed to "%s", fourth parameter removed in the if(realpath() == Null) of setContent() function. --- stglibs/dotconfpp.lib/dotconfpp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stglibs/dotconfpp.lib/dotconfpp.cpp b/stglibs/dotconfpp.lib/dotconfpp.cpp index caf5a590..8f766f01 100644 --- a/stglibs/dotconfpp.lib/dotconfpp.cpp +++ b/stglibs/dotconfpp.lib/dotconfpp.cpp @@ -336,7 +336,7 @@ int DOTCONFDocument::setContent(const char * _fileName) char realpathBuf[PATH_MAX]; if(realpath(_fileName, realpathBuf) == NULL){ - error(0, _fileName, "realpath('%s') failed: %s", _fileName, strerror(errno)); + error(0, _fileName, "%s", strerror(errno)); return -1; } @@ -514,9 +514,9 @@ void DOTCONFDocument::error(int lineNum, const char * fileName, const char * fmt char * buf = (char*)mempool->alloc(len); if(lineNum) - (void) snprintf(buf, len, "DOTCONF++: file '%s', line %d: %s\n", fileName, lineNum, msg); + (void) snprintf(buf, len, "File '%s', line %d: %s\n", fileName, lineNum, msg); else - (void) snprintf(buf, len, "DOTCONF++: file '%s': %s\n", fileName, msg); + (void) snprintf(buf, len, "File '%s': %s\n", fileName, msg); if (errorCallback) { errorCallback(errorCallbackData, buf); -- 2.43.2