Browse Source

image_binary_t -> struct image_binary

Remove misleading typedef and redundant suffix from struct image_binary.
tags/v0.4.0-rc1
Zachary T Welch 14 years ago
parent
commit
a87faf5b66
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      src/target/image.c
  2. +2
    -2
      src/target/image.h

+ 4
- 4
src/target/image.c View File

@@ -680,9 +680,9 @@ int image_open(image_t *image, const char *url, const char *type_string)


if (image->type == IMAGE_BINARY) if (image->type == IMAGE_BINARY)
{ {
image_binary_t *image_binary;
struct image_binary *image_binary;


image_binary = image->type_private = malloc(sizeof(image_binary_t));
image_binary = image->type_private = malloc(sizeof(struct image_binary));


if ((retval = fileio_open(&image_binary->fileio, url, FILEIO_READ, FILEIO_BINARY)) != ERROR_OK) if ((retval = fileio_open(&image_binary->fileio, url, FILEIO_READ, FILEIO_BINARY)) != ERROR_OK)
{ {
@@ -811,7 +811,7 @@ int image_read_section(image_t *image, int section, uint32_t offset, uint32_t si


if (image->type == IMAGE_BINARY) if (image->type == IMAGE_BINARY)
{ {
image_binary_t *image_binary = image->type_private;
struct image_binary *image_binary = image->type_private;


/* only one section in a plain binary */ /* only one section in a plain binary */
if (section != 0) if (section != 0)
@@ -938,7 +938,7 @@ void image_close(image_t *image)
{ {
if (image->type == IMAGE_BINARY) if (image->type == IMAGE_BINARY)
{ {
image_binary_t *image_binary = image->type_private;
struct image_binary *image_binary = image->type_private;


fileio_close(&image_binary->fileio); fileio_close(&image_binary->fileio);
} }


+ 2
- 2
src/target/image.h View File

@@ -67,10 +67,10 @@ typedef struct image_s
uint32_t start_address; /* start address, if one is set */ uint32_t start_address; /* start address, if one is set */
} image_t; } image_t;


typedef struct image_binary_s
struct image_binary
{ {
struct fileio fileio; struct fileio fileio;
} image_binary_t;
};


typedef struct image_ihex_s typedef struct image_ihex_s
{ {


Loading…
Cancel
Save