This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] Extract get_uncompressed_size


On Sat, 4 Apr 2015, H.J. Lu wrote:
>
> 	* compress.c (get_uncompressed_size): New.  Extracted from ...
> 	(bfd_init_section_decompress_status): This.  Use it.

> +static bfd_size_type
> +get_uncompressed_size (bfd_byte *compressed_size_buffer)
> +{
> +  bfd_size_type uncompressed_size = compressed_size_buffer[0];
> +  uncompressed_size <<= 8;
...

> +  uncompressed_size += compressed_size_buffer[7];
> +  return uncompressed_size;;
> +}

I know you're just copying code, but for the next copy, please
consider also change to use bfd functions, in this case bfd_getb64?

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]