image: align image only if needed
This commit is contained in:
1 parent
cd52b36d38
commit
01726cddc5
1 file changed
+2
-1
+2
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user