forked from auracaster/openocd
target/image: Use proper data types
While at it, fix some coding style issues. Change-Id: Id521394d89e0bf787a6f812701c2cc0fe7e4e63f Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5919 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
6dbfdcd00f
commit
73746d78b7
@@ -393,7 +393,7 @@ static int ulink_load_firmware_and_renumerate(struct ulink **device,
|
||||
static int ulink_load_firmware(struct ulink *device, const char *filename)
|
||||
{
|
||||
struct image ulink_firmware_image;
|
||||
int ret, i;
|
||||
int ret;
|
||||
|
||||
ret = ulink_cpu_reset(device, CPU_RESET);
|
||||
if (ret != ERROR_OK) {
|
||||
@@ -402,7 +402,7 @@ static int ulink_load_firmware(struct ulink *device, const char *filename)
|
||||
}
|
||||
|
||||
ulink_firmware_image.base_address = 0;
|
||||
ulink_firmware_image.base_address_set = 0;
|
||||
ulink_firmware_image.base_address_set = false;
|
||||
|
||||
ret = image_open(&ulink_firmware_image, filename, "ihex");
|
||||
if (ret != ERROR_OK) {
|
||||
@@ -411,7 +411,7 @@ static int ulink_load_firmware(struct ulink *device, const char *filename)
|
||||
}
|
||||
|
||||
/* Download all sections in the image to ULINK */
|
||||
for (i = 0; i < ulink_firmware_image.num_sections; i++) {
|
||||
for (unsigned int i = 0; i < ulink_firmware_image.num_sections; i++) {
|
||||
ret = ulink_write_firmware_section(device, &ulink_firmware_image, i);
|
||||
if (ret != ERROR_OK)
|
||||
return ret;
|
||||
|
||||
@@ -134,7 +134,7 @@ static int load_usb_blaster_firmware(struct libusb_device_handle *libusb_dev,
|
||||
}
|
||||
|
||||
ublast2_firmware_image.base_address = 0;
|
||||
ublast2_firmware_image.base_address_set = 0;
|
||||
ublast2_firmware_image.base_address_set = false;
|
||||
|
||||
int ret = image_open(&ublast2_firmware_image, low->firmware_path, "ihex");
|
||||
if (ret != ERROR_OK) {
|
||||
@@ -162,7 +162,7 @@ static int load_usb_blaster_firmware(struct libusb_device_handle *libusb_dev,
|
||||
100);
|
||||
|
||||
/* Download all sections in the image to ULINK */
|
||||
for (int i = 0; i < ublast2_firmware_image.num_sections; i++) {
|
||||
for (unsigned int i = 0; i < ublast2_firmware_image.num_sections; i++) {
|
||||
ret = ublast2_write_firmware_section(libusb_dev,
|
||||
&ublast2_firmware_image, i);
|
||||
if (ret != ERROR_OK) {
|
||||
|
||||
Reference in New Issue
Block a user