diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-02-12 11:17:21 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-02-12 11:17:21 +0100 |
commit | d2715d7c3534f35de0ebdd30d8d770bd79ca7a23 (patch) | |
tree | 80de4c11ec692fbd82e86df23d1e5c559de8d7f8 /server/src/templateheaderparser.cc | |
parent | 1e3a2a96d3eca9ff10a5e7c222bddc6ba018b41f (diff) |
Fix 64bit compilation
Diffstat (limited to 'server/src/templateheaderparser.cc')
-rw-r--r-- | server/src/templateheaderparser.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/server/src/templateheaderparser.cc b/server/src/templateheaderparser.cc index b2c68e3..3c327fd 100644 --- a/server/src/templateheaderparser.cc +++ b/server/src/templateheaderparser.cc @@ -110,8 +110,9 @@ void TemplateHeaderParser::startTag(std::string name, attributes_t &attr) int TemplateHeaderParser::readData(char *data, size_t size) { - if(t) return 0; // If t is allocated, it means that we have parsed the template - // tag, and can dismiss the rest of the document. + // If t is allocated, it means that we have parsed the template + // tag, and can dismiss the rest of the document. + if(t) return 0; if(fd == -1) { ERR_LOG(templateparser, "Invalid file descriptor.\n"); @@ -125,12 +126,15 @@ int TemplateHeaderParser::readData(char *data, size_t size) return r; } -void TemplateHeaderParser::parseError(const char *buf, size_t len, std::string error, int lineno) +void TemplateHeaderParser::parseError(const char *buf, size_t len, + std::string error, int lineno) { - if(t) return; // Ignore "unclosed token" errors when the template tag has been parsed. + // Ignore "unclosed token" errors when the template tag has been parsed. + if(t) return; - ERR_LOG(templateparser, "TemplateHeaderParser[%s] error at line %d: %s\n", file.c_str(), lineno, error.c_str()); - ERR_LOG(templateparser, "\tBuffer %u bytes: [", len); + ERR_LOG(templateparser, "TemplateHeaderParser[%s] error at line %d: %s\n", + file.c_str(), lineno, error.c_str()); + ERR_LOG(templateparser, "\tBuffer %u bytes: [", (int)len); if(fwrite(buf, len, 1, stderr) != len) {} ERR_LOG(templateparser, "]\n"); |