mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02:31 +00:00
* Casting printf input to match the format type.
* Properly clear the queued events during closing of a socket by checking for the file descriptor, not the ptr. * SCGI m_task queue could overflow since the check was not working. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1246 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+3
-3
@@ -274,7 +274,7 @@ convert_to_string(const torrent::Object& rawSrc) {
|
||||
switch (src.type()) {
|
||||
case torrent::Object::TYPE_VALUE: {
|
||||
char buffer[64];
|
||||
snprintf(buffer, 64, "%lli", src.as_value());
|
||||
snprintf(buffer, 64, "%lli", (long long int)src.as_value());
|
||||
return std::string(buffer);
|
||||
}
|
||||
case torrent::Object::TYPE_STRING: return src.as_string();
|
||||
@@ -449,7 +449,7 @@ print_object(char* first, char* last, const torrent::Object* src, int flags) {
|
||||
}
|
||||
|
||||
case torrent::Object::TYPE_VALUE:
|
||||
return std::min(first + snprintf(first, std::distance(first, last), "%lli", src->as_value()), last);
|
||||
return std::min(first + snprintf(first, std::distance(first, last), "%lli", (long long int)src->as_value()), last);
|
||||
|
||||
case torrent::Object::TYPE_LIST:
|
||||
if (first != last)
|
||||
@@ -491,7 +491,7 @@ print_object_std(std::string* dest, const torrent::Object* src, int flags) {
|
||||
case torrent::Object::TYPE_VALUE:
|
||||
{
|
||||
char buffer[64];
|
||||
snprintf(buffer, 64, "%lli", src->as_value());
|
||||
snprintf(buffer, 64, "%lli", (long long int)src->as_value());
|
||||
|
||||
*dest += buffer;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user