Merge pull request #6264 from iSevenDays/patch-10

Fix loosing precision: int -> size_t for the return value of `recv`
This commit is contained in:
James Chen 2014-04-25 11:11:52 +08:00
commit efd16bc37e
1 changed files with 2 additions and 4 deletions

View File

@ -853,8 +853,7 @@ void Console::commandUpload(int fd)
ssize_t Console::readBytes(int fd, char* buffer, size_t maxlen, bool* more)
{
size_t n;
int rc;
size_t n, rc;
char c, *ptr = buffer;
*more = false;
for( n = 0; n < maxlen; n++ ) {
@ -964,8 +963,7 @@ bool Console::parseCommand(int fd)
ssize_t Console::readline(int fd, char* ptr, size_t maxlen)
{
size_t n;
int rc;
size_t n, rc;
char c;
for( n = 0; n < maxlen - 1; n++ ) {