This is an automated email from Gerrit.
?yvind Harboe ([email protected]) just uploaded a new patch set to Gerrit,
which you can find at http://openocd.zylin.com/182
-- gerrit
commit e12b4f3e0e4ead5d05b4aa868c8e423766a3c6a9
Author: Ãyvind Harboe <[email protected]>
Date: Tue Nov 8 17:50:01 2011 +0100
buspirate: add missing error propagation
found by clang.
Change-Id: I80ea8e6afc8dcc1aa7edb6f63af0d94f6781b81c
Signed-off-by: Ãyvind Harboe <[email protected]>
diff --git a/src/jtag/drivers/buspirate.c b/src/jtag/drivers/buspirate.c
index 3a368eb..b67d8b0 100644
--- a/src/jtag/drivers/buspirate.c
+++ b/src/jtag/drivers/buspirate.c
@@ -608,6 +608,10 @@ static int buspirate_tap_execute(void)
}
ret = buspirate_serial_read(buspirate_fd, tmp, bytes_to_send + 3);
+ if (ret != bytes_to_send + 3) {
+ LOG_ERROR("error reading");
+ return ERROR_FAIL;
+ }
in_buf = (uint8_t *)(&tmp[3]);
/* parse the scans */
@@ -743,6 +747,10 @@ static void buspirate_jtag_enable(int fd)
cmd_sent = 1;
tmp[0] = CMD_ENTER_OOCD;
ret = buspirate_serial_write(fd, tmp, 1);
+ if (ret != bytes_to_send + 1) {
+ LOG_ERROR("error reading");
+ return ERROR_FAIL;
+ }
}
} else if (strncmp(tmp, "OCD1", 4) == 0)
done = 1;
--
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Openocd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel