aboutsummaryrefslogtreecommitdiff
path: root/src/backend_libtiff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend_libtiff.c')
-rw-r--r--src/backend_libtiff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend_libtiff.c b/src/backend_libtiff.c
index e837a46..a489cc1 100644
--- a/src/backend_libtiff.c
+++ b/src/backend_libtiff.c
@@ -81,7 +81,7 @@ static void source_free(struct imv_source *src)
static struct imv_bitmap *to_imv_bitmap(int width, int height, void *bitmap)
{
- struct imv_bitmap *bmp = malloc(sizeof(struct imv_bitmap));
+ struct imv_bitmap *bmp = malloc(sizeof *bmp);
bmp->width = width;
bmp->height = height;
bmp->format = IMV_ABGR;
@@ -169,7 +169,7 @@ static enum backend_result open_path(const char *path, struct imv_source **src)
TIFFGetField(private.tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(private.tiff, TIFFTAG_IMAGELENGTH, &height);
- struct imv_source *source = calloc(1, sizeof(struct imv_source));
+ struct imv_source *source = calloc(1, sizeof *source);
source->name = strdup(path);
source->width = width;
source->height = height;
@@ -190,7 +190,7 @@ static enum backend_result open_path(const char *path, struct imv_source **src)
static enum backend_result open_memory(void *data, size_t len, struct imv_source **src)
{
- struct private *private = malloc(sizeof(struct private));
+ struct private *private = malloc(sizeof *private);
private->data = data;
private->len = len;
private->pos = 0;
@@ -207,7 +207,7 @@ static enum backend_result open_memory(void *data, size_t len, struct imv_source
TIFFGetField(private->tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(private->tiff, TIFFTAG_IMAGELENGTH, &height);
- struct imv_source *source = calloc(1, sizeof(struct imv_source));
+ struct imv_source *source = calloc(1, sizeof *source);
source->name = strdup("-");
source->width = width;
source->height = height;