[MPlayer-dev-eng] [RFC] always memset structs to 0 in libass

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sat Mar 28 20:00:42 CET 2009


On Saturday 28 March 2009 21:36:54 Reimar Döffinger wrote:
> Hello,
> I originally stumbled over this because of valgrind warnings.
> The real issue is that you can't just use the default
> hashmap_hash/hashmap_key_compare with structs, but I leave that to the
> libass maintainer(s).
> Independent of that, I consider it a good idea to initialize all
> structs to 0 anyway, simply because
> 1) it makes it easier to extend those structs without running into weird
> random bugs
> 2) for what I can tell there are only exactly _three_ places where this
> is currently not done, so it makes things more consistent as well.
>
> Attached is the proposed patch for this.

Sure, I also find it a good idea. Btw, your patch contains unrelated changes ;) 
They are fine, too.



More information about the MPlayer-dev-eng mailing list