summaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-08-08 20:39:27 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-08-08 20:39:27 +0200
commitb581c7f25d47ce3936e537328569bc4258af4f17 (patch)
treeca07f8f8eef96cd4f3d50667bb2529eec6b31c9a /src/image.c
parentd10814e808da1df8bd02541d3bef86fadde518a9 (diff)
download0xFFFF-b581c7f25d47ce3936e537328569bc4258af4f17.tar.bz2
image: call image_align after checking hash
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c
index b5a7576..42ba53d 100644
--- a/src/image.c
+++ b/src/image.c
@@ -237,7 +237,6 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui
image->cur = 0;
image_append(image, type, device, hwrevs, version, layout);
- image_align(image);
if ( image->hash != hash ) {
fprintf(stderr, "Error: Image hash mishmash (expected %#04x)\n", image->hash);
@@ -245,6 +244,8 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui
return NULL;
}
+ image_align(image);
+
return image;
}