bug #21076: -vvvv serial receive prints are empty in Win32 build

In ser_recv(): Drop the essentially unused variable "len", and use the
variable "read" in order to track how many bytes have just been read
in.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@753 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2007-10-29 21:51:07 +00:00
parent 421fbd9c94
commit d508683427
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2007-10-29 Joerg Wunsch <j@uriah.heep.sax.de>
bug #21076: -vvvv serial receive prints are empty in Win32 build
* ser_win32.c (ser_recv): Drop the essentially unused variable
"len", and use the variable "read" in order to track how many
bytes have just been read in.
2007-10-29 Joerg Wunsch <j@uriah.heep.sax.de>
bug #21145: atmega329p not recognized

View File

@ -245,7 +245,6 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen
{
unsigned char c;
unsigned char * p = buf;
size_t len = 0;
DWORD read;
HANDLE hComPort=(HANDLE)fd->pfd;
@ -282,7 +281,7 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen
{
fprintf(stderr, "%s: Recv: ", progname);
while (len) {
while (read) {
c = *p;
if (isprint(c)) {
fprintf(stderr, "%c ", c);
@ -293,7 +292,7 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen
fprintf(stderr, "[%02x] ", c);
p++;
len--;
read--;
}
fprintf(stderr, "\n");
}