From a9efea59fac006ecedba1b63f0e19c479ee90bfe Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Tue, 7 Feb 2012 12:29:00 +0200 Subject: [PATCH] Fix strange prontf usage --- projects/sgconf/parser.cpp | 3 +-- projects/sgconf_xml/parser.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/sgconf/parser.cpp b/projects/sgconf/parser.cpp index 8e1e3cf1..82b7ca9e 100644 --- a/projects/sgconf/parser.cpp +++ b/projects/sgconf/parser.cpp @@ -111,8 +111,7 @@ while (n != ans->end()) if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR) { - char s[128]; - printf(s, "Parse error at line %d:\n%s\n", + printf("Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser))); exit(UNKNOWN_ERR_CODE); diff --git a/projects/sgconf_xml/parser.cpp b/projects/sgconf_xml/parser.cpp index 99b48a7b..f2d5993b 100644 --- a/projects/sgconf_xml/parser.cpp +++ b/projects/sgconf_xml/parser.cpp @@ -166,8 +166,7 @@ while (n != ans->end()) if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR) { - char s[128]; - printf(s, "Parse error at line %d: %s", + printf("Parse error at line %d: %s", XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser))); return st_xml_parse_error; -- 2.44.2