Re: [PATCH 4/5] Avoid to call ceil_log_2 twice with same value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

On Wed, 2016-01-27 at 16:09 +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  common/quic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/quic.c b/common/quic.c
> index 0e6c948..a32a530 100644
> --- a/common/quic.c
> +++ b/common/quic.c
> @@ -394,9 +394,9 @@ static void family_init(QuicFamily *family, int bpc, int
> limit)
>          altcodewords = bppmask[bpc] + 1 - (altprefixlen << l);
>  
>          family->nGRcodewords[l] = (altprefixlen << l);
> -        family->notGRcwlen[l] = altprefixlen + ceil_log_2(altcodewords);
> -        family->notGRprefixmask[l] = bppmask[32 - altprefixlen]; /* needed
> for decoding only */
>          family->notGRsuffixlen[l] = ceil_log_2(altcodewords); /* needed for
> decoding only */
> +        family->notGRcwlen[l] = altprefixlen + family->notGRsuffixlen[l];
> +        family->notGRprefixmask[l] = bppmask[32 - altprefixlen]; /* needed
> for decoding only */
>  
>          for (b = 0; b < 256; b++) {
>              unsigned int code, len;
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]