diff mbox

vdi: remove double conversion

Message ID 1402063613-12400-1-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 6, 2014, 2:06 p.m. UTC
This should be a problem when running on big-endian machines.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
	It's time to clean up old branch, and I found this nice little
	patch from May 2012.

 block/vdi.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Benoît Canet June 6, 2014, 2:14 p.m. UTC | #1
The Friday 06 Jun 2014 à 16:06:52 (+0200), Paolo Bonzini wrote :
> This should be a problem when running on big-endian machines.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 	It's time to clean up old branch, and I found this nice little
> 	patch from May 2012.
> 
>  block/vdi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/block/vdi.c b/block/vdi.c
> index 119d3c7..993430e 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -237,7 +237,6 @@ static void vdi_header_to_le(VdiHeader *header)
>      cpu_to_le32s(&header->block_extra);
>      cpu_to_le32s(&header->blocks_in_image);
>      cpu_to_le32s(&header->blocks_allocated);
> -    cpu_to_le32s(&header->blocks_allocated);
>      uuid_convert(header->uuid_image);
>      uuid_convert(header->uuid_last_snap);
>      uuid_convert(header->uuid_link);
> -- 
> 1.8.3.1
> 
> 
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Michael Tokarev June 8, 2014, 1:14 p.m. UTC | #2
Applied to -trivial, thank you!

/mjt
Stefan Weil June 8, 2014, 2:43 p.m. UTC | #3
Am 06.06.2014 16:14, schrieb Benoît Canet:
> The Friday 06 Jun 2014 à 16:06:52 (+0200), Paolo Bonzini wrote :
>> This should be a problem when running on big-endian machines.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> 	It's time to clean up old branch, and I found this nice little
>> 	patch from May 2012.
>>
>>  block/vdi.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/block/vdi.c b/block/vdi.c
>> index 119d3c7..993430e 100644
>> --- a/block/vdi.c
>> +++ b/block/vdi.c
>> @@ -237,7 +237,6 @@ static void vdi_header_to_le(VdiHeader *header)
>>      cpu_to_le32s(&header->block_extra);
>>      cpu_to_le32s(&header->blocks_in_image);
>>      cpu_to_le32s(&header->blocks_allocated);
>> -    cpu_to_le32s(&header->blocks_allocated);
>>      uuid_convert(header->uuid_image);
>>      uuid_convert(header->uuid_last_snap);
>>      uuid_convert(header->uuid_link);
>> -- 
>> 1.8.3.1
>>
>>
> Reviewed-by: Benoit Canet <benoit@irqsave.net>
> 

Autsch, that's a really old (2009) copy+paste bug. Thanks for fixing it.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
(creator of that bug)
diff mbox

Patch

diff --git a/block/vdi.c b/block/vdi.c
index 119d3c7..993430e 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -237,7 +237,6 @@  static void vdi_header_to_le(VdiHeader *header)
     cpu_to_le32s(&header->block_extra);
     cpu_to_le32s(&header->blocks_in_image);
     cpu_to_le32s(&header->blocks_allocated);
-    cpu_to_le32s(&header->blocks_allocated);
     uuid_convert(header->uuid_image);
     uuid_convert(header->uuid_last_snap);
     uuid_convert(header->uuid_link);