diff options
Diffstat (limited to 'ndb/src/mgmsrv/InitConfigFileParser.cpp')
-rw-r--r-- | ndb/src/mgmsrv/InitConfigFileParser.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp index 008a9d0551f..fdfe7823fc2 100644 --- a/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -110,7 +110,7 @@ InitConfigFileParser::parseConfig(FILE * file) { "of configuration file."); return 0; } - snprintf(ctx.fname, sizeof(ctx.fname), section); free(section); + BaseString::snprintf(ctx.fname, sizeof(ctx.fname), section); free(section); ctx.type = InitConfigFileParser::DefaultSection; ctx.m_sectionLineno = ctx.m_lineno; ctx.m_currentSection = new Properties(true); @@ -130,7 +130,7 @@ InitConfigFileParser::parseConfig(FILE * file) { "of configuration file."); return 0; } - snprintf(ctx.fname, sizeof(ctx.fname), section); + BaseString::snprintf(ctx.fname, sizeof(ctx.fname), section); free(section); ctx.type = InitConfigFileParser::Section; ctx.m_sectionLineno = ctx.m_lineno; @@ -172,7 +172,7 @@ InitConfigFileParser::parseConfig(FILE * file) { return 0; for(size_t j = 0; j<tmp.size(); j++){ - snprintf(ctx.fname, sizeof(ctx.fname), tmp[j].m_sectionType.c_str()); + BaseString::snprintf(ctx.fname, sizeof(ctx.fname), tmp[j].m_sectionType.c_str()); ctx.type = InitConfigFileParser::Section; ctx.m_currentSection = tmp[j].m_sectionData; ctx.m_userDefaults = getSection(ctx.fname, ctx.m_defaults); @@ -198,7 +198,7 @@ InitConfigFileParser::parseConfig(FILE * file) { ctx.m_config->put("NoOfNodes", nNodes); char tmpLine[MAX_LINE_LENGTH]; - snprintf(tmpLine, MAX_LINE_LENGTH, "EXTERNAL SYSTEM_"); + BaseString::snprintf(tmpLine, MAX_LINE_LENGTH, "EXTERNAL SYSTEM_"); strncat(tmpLine, system, MAX_LINE_LENGTH); strncat(tmpLine, ":NoOfConnections", MAX_LINE_LENGTH); ctx.m_config->put(tmpLine, nExtConnections); @@ -549,13 +549,13 @@ InitConfigFileParser::storeSection(Context& ctx){ for(int i = strlen(ctx.fname) - 1; i>=0; i--){ ctx.fname[i] = toupper(ctx.fname[i]); } - snprintf(ctx.pname, sizeof(ctx.pname), ctx.fname); + BaseString::snprintf(ctx.pname, sizeof(ctx.pname), ctx.fname); char buf[255]; if(ctx.type == InitConfigFileParser::Section) - snprintf(buf, sizeof(buf), "%s", ctx.fname); + BaseString::snprintf(buf, sizeof(buf), "%s", ctx.fname); if(ctx.type == InitConfigFileParser::DefaultSection) - snprintf(buf, sizeof(buf), "%s DEFAULT", ctx.fname); - snprintf(ctx.fname, sizeof(ctx.fname), buf); + BaseString::snprintf(buf, sizeof(buf), "%s DEFAULT", ctx.fname); + BaseString::snprintf(ctx.fname, sizeof(ctx.fname), buf); if(ctx.type == InitConfigFileParser::Section){ for(int i = 0; i<m_info->m_NoOfRules; i++){ const ConfigInfo::SectionRule & rule = m_info->m_SectionRules[i]; @@ -581,7 +581,7 @@ InitConfigFileParser::Context::reportError(const char * fmt, ...){ va_start(ap, fmt); if (fmt != 0) - vsnprintf(buf, sizeof(buf)-1, fmt, ap); + BaseString::vsnprintf(buf, sizeof(buf)-1, fmt, ap); ndbout << "Error line " << m_lineno << ": " << buf << endl; va_end(ap); @@ -595,7 +595,7 @@ InitConfigFileParser::Context::reportWarning(const char * fmt, ...){ va_start(ap, fmt); if (fmt != 0) - vsnprintf(buf, sizeof(buf)-1, fmt, ap); + BaseString::vsnprintf(buf, sizeof(buf)-1, fmt, ap); ndbout << "Warning line " << m_lineno << ": " << buf << endl; va_end(ap); } |