git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed build script for rlm_stg.
[stg.git]
/
projects
/
sgconf
/
parser.cpp
diff --git
a/projects/sgconf/parser.cpp
b/projects/sgconf/parser.cpp
index 8e1e3cf1fe5c7e4b6fa8595f5b7864658116db14..9d340e8315f4e41780b650a8c953d30bca64e8d1 100644
(file)
--- a/
projects/sgconf/parser.cpp
+++ b/
projects/sgconf/parser.cpp
@@
-86,7
+86,6
@@
parse_depth--;
int ParseReply(void * data, list<string> * ans)
{
int done = 0;
int ParseReply(void * data, list<string> * ans)
{
int done = 0;
-int len;
parse_depth = 0;
parser = XML_ParserCreate(NULL);
parse_depth = 0;
parser = XML_ParserCreate(NULL);
@@
-103,7
+102,7
@@
XML_SetElementHandler(parser, StartElement, EndElement);
list<string>::iterator n = ans->begin();
while (n != ans->end())
{
list<string>::iterator n = ans->begin();
while (n != ans->end())
{
- len = strlen(n->c_str());
+
size_t
len = strlen(n->c_str());
if (++n == ans->end())
done = 1;
if (++n == ans->end())
done = 1;
@@
-111,8
+110,7
@@
while (n != ans->end())
if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR)
{
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);
XML_GetCurrentLineNumber(parser),
XML_ErrorString(XML_GetErrorCode(parser)));
exit(UNKNOWN_ERR_CODE);