X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/245dde96193702f7f51389d3583dee547f8ba366..671a55ba455dcf4e5ce6d86b202761666f54d5c6:/apt-pkg/contrib/strutl.cc diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 5731b5a2b..396cb7898 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -331,7 +331,7 @@ string QuoteString(const string &Str, const char *Bad) *I == 0x25 || // percent '%' char *I <= 0x20 || *I >= 0x7F) // control chars { - ioprintf(Res,"%%%02x",(int)*I); + ioprintf(Res, "%%%02hhx", *I); } else Res << *I; @@ -1308,7 +1308,7 @@ void ioprintf(ostream &out,const char *format,...) va_list args; ssize_t size = 400; while (true) { - bool ret = false; + bool ret; va_start(args,format); ret = iovprintf(out, format, args, size); va_end(args); @@ -1322,7 +1322,7 @@ void strprintf(string &out,const char *format,...) ssize_t size = 400; std::ostringstream outstr; while (true) { - bool ret = false; + bool ret; va_start(args,format); ret = iovprintf(outstr, format, args, size); va_end(args);