summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-09-27 01:00:14 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 01:00:14 +0200
commit84361defb573c52d9a5368069254d1e18105aa62 (patch)
tree32b862abf00a8f642896280d79a2363b3e6884b9 /methods
parent9d02c1ac77717a2a8055e56dad4974abb15c800b (diff)
fix: %i in format string (no. 1) requires 'int' but the argument type is
'unsigned int' Git-Dch: Ignore Reported-By: cppcheck
Diffstat (limited to 'methods')
-rw-r--r--methods/server.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/methods/server.cc b/methods/server.cc
index ff67eb09b..4a961f454 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -324,10 +324,10 @@ ServerMethod::DealWithHeaders(FetchResult &Res)
failure */
if (Server->Result < 200 || Server->Result >= 300)
{
- char err[255];
- snprintf(err,sizeof(err)-1,"HttpError%i",Server->Result);
+ std::string err;
+ strprintf(err, "HttpError%u", Server->Result);
SetFailReason(err);
- _error->Error("%u %s",Server->Result,Server->Code);
+ _error->Error("%u %s", Server->Result, Server->Code);
if (Server->HaveContent == true)
return ERROR_WITH_CONTENT_PAGE;
return ERROR_UNRECOVERABLE;