]> git.saurik.com Git - apt.git/commitdiff
fix: %i in format string (no. 1) requires 'int' but the argument type is
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 23:00:14 +0000 (01:00 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 23:00:14 +0000 (01:00 +0200)
'unsigned int'

Git-Dch: Ignore
Reported-By: cppcheck
methods/server.cc

index ff67eb09b0dfebaa510a79cfa7e74d9373da2a49..4a961f454df65bd152e29c75ed04afec920db620 100644 (file)
@@ -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;