From 2dbc1647ad832e76b493644ec13991af3ebe49b6 Mon Sep 17 00:00:00 2001 From: mludvig Date: Mon, 12 Oct 2009 06:51:53 +0000 Subject: [PATCH] * buspirate.c: Replace GNU-only %as with %s in sscanf call. * ser_win32.c(ser_set_dtr_rts): Fixed typo in parameter name. * NEWS: Announce BusPirate. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@865 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ NEWS | 2 ++ buspirate.c | 4 ++-- ser_win32.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c411d1d..41b14141 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-12 Michal Ludvig + + * buspirate.c: Replace GNU-only %as with %s in sscanf call. + * ser_win32.c(ser_set_dtr_rts): Fixed typo in parameter name. + * NEWS: Announce BusPirate. + 2009-10-10 Michal Ludvig Support for Arduino auto-reset: diff --git a/NEWS b/NEWS index 76874b9c..795bc3d8 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ Current: * New programmers supported: + - BusPirate + * Bugfixes Version 5.8: diff --git a/buspirate.c b/buspirate.c index dc9313df..32cd660a 100644 --- a/buspirate.c +++ b/buspirate.c @@ -174,12 +174,12 @@ static int buspirate_start_spi_mode(struct programmer_t *pgm) { int spi_cmd = -1; int cmd; - char *rcvd, *mode, buf[5]; + char *rcvd, mode[11], buf[5]; buspirate_send(pgm, "M\n"); while(1) { rcvd = buspirate_readline(pgm, NULL, 0); - if (spi_cmd == -1 && sscanf(rcvd, "%d. %as", &cmd, &mode)) { + if (spi_cmd == -1 && sscanf(rcvd, "%d. %10s", &cmd, mode)) { if (strcmp(mode, "SPI") == 0) spi_cmd = cmd; } diff --git a/ser_win32.c b/ser_win32.c index bce99f50..e68ac1fb 100644 --- a/ser_win32.c +++ b/ser_win32.c @@ -203,7 +203,7 @@ static void ser_close(union filedescriptor *fd) hComPort = INVALID_HANDLE_VALUE; } -static int ser_set_dtr_rts(union filedescriptor *fdp, int is_on) +static int ser_set_dtr_rts(union filedescriptor *fd, int is_on) { HANDLE hComPort=(HANDLE)fd->pfd;