Re: [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

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

 



> On 18 Jul 2017, at 17:28, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> 
> On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote:
>> Remove CxImage linking.
>> Support Windows BMP format.
> 
> Too bad there is no small/maintained library which would do that for us
> :-/ From a quick glance, looks ok.
> 
> 
>> 
>> +static inline size_t compute_dib_stride(unsigned width, unsigned bit_count)
> 
> Can you use full type names, unsigned int?

No. Really, no ;-) Otherwise, for consistency, you should replace ‘int’ with ‘signed int’, specify whether char are signed or unsigned, and use ’signed long int’ instead of ‘long’. And while we are at it, decide whether “int long unsigned typedef ulong” is evil, or whether it’s the epitome of C syntactic elegance.


Christophe 
> 
> Christophe
> 
>> +{
>> +    return ((width * bit_count + 31u) & ~31u) / 8u;
>> +}
>> +
>> /**
>>  * Returns image to put in the clipboard.
>>  *
>> -- 
>> 2.13.3
>> 
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]