From 01726cddc5424d6cf1a63fe68ba905eb05feef85 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 7 Aug 2012 18:42:05 +0200 Subject: image: align image only if needed --- src/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/image.c b/src/image.c index fcf7952..c59577a 100644 --- a/src/image.c +++ b/src/image.c @@ -155,7 +155,8 @@ static void image_align(struct image * image) { if ( align == 0 ) return; - /* TODO : check if aligning is needed */ + if ( ( image->size & ( ( 1ULL << align ) - 1 ) ) == 0 ) + return; align = ((image->size >> align) + 1) << align; -- cgit v1.2.3