Le 28/09/2010 17:16, Adam Jackson a écrit :
> It's correct but it's exactly as ridiculous as the original.  How's this
> instead:

♥ !

Although...

> --- a/hw/xfree86/vbe/vbe.c
> +++ b/hw/xfree86/vbe/vbe.c
> @@ -529,67 +529,7 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
>  
>      block = calloc(sizeof(VbeModeInfoBlock), 1);

... maybe this one can become a regular malloc(), since the structure is
packed and the copy covers the entire struct, there won't be any
uninitialized holes.

[...]

> +    memcpy(block, pVbe->memory, 256);

Just wondering, why not use sizeof here as well? Am I missing something?

In any case, the new patch makes a whole lot more sense than the old
code, I still can't believe it was that simple. I'll gladly update your
patch if needs be.

Reviewed-by: Rémi Cardona <[email protected]>

Cheers
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to