Re: [PATCH 1/2] d3d9: Return D3D_OK from the palette setters
On 11 January 2013 09:49, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
- * Copyright 2006-2007, 2010 Stefan Dösinger for CodeWeavers + * Copyright 2006-2008,2010-2011,2013 Stefan Dösinger for CodeWeavers I'm going to assume you're changing this because you checked it, but the formatting is a bit off.
+ memset(&caps, 0, sizeof(caps)); That's redundant.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Am 2013-01-11 12:24, schrieb Henri Verbeet:
+ memset(&caps, 0, sizeof(caps)); That's redundant. I don't think it's worth a big argument and resent the patches without it, but IMO zeroing output structures in the tests makes sense. Ideally we'd have a test that explicitly tests if GetDeviceCaps clears the structure. All other tests should clear the structure to avoid randomness - there might be a third d3d9 implementation where the author forgot to clear the structure.
Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJQ7/xWAAoJEN0/YqbEcdMw49wP/26xX3+Q6i2cEm5X8vz5flxH 6TmKuEuZYyr30ZAfgrYHLgL795xTO6o7DGvf8Eq2QuOzTRXekZpFeaq+44XOY3ge fm5U0IRXstEFGjkQCrCh8CpvUFmGquJ10KC8O1BKHXfTr7fxeXhQldbEmYVpBv0U haJpNJ9FzMj7zocdM+YmR+eRRMGWloKc1MFWj5ELoNUW1w8YEIc7kzZ1WjP9vvTd YaVCAlxM8Z0i/RQ40w0CZuojfNp535nW64gKu2J/Pt07grEhRr278TWwtjmPPcWe h/VdSs9UBgaPN5K1PUG07zebAba0QiB5u1xg17nr3UFFVvJAUG7/V1a7ghL6Yeek b177ZFWWGXIe4iGSsRR7Sa/Ats2NTNEUTBJ3J6+V0QUt/rDpwENgN1JyCNcAmn7p aKboLUmRhaOwk+pBlWJz/o8YVA0EFxopq4F/kyj9D5F2Xuve3yFdjHbEy5bLHDdI EN7mFt+9BldO0hB6EaY9y/gFyu9c03h9hxyphLcFHN1Jr7S7ujR51It2OmejZvyi rdsW5RWhLqbtqC5SyginbA4ZhfgvnEqwnbmesH2sThcWoX35q+ezBvnjxp7jGCVx 1S9ojUDdFyUGrqcCk/E6EnKuwsNinL33KklE838JPkjMkWtN01P80qAvDB2Hiiom tLq+1EzH4WaInGfJBJDq =x2pM -----END PGP SIGNATURE-----
On 11 January 2013 12:49, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
I don't think it's worth a big argument and resent the patches without it, but IMO zeroing output structures in the tests makes sense. Ideally we'd have a test that explicitly tests if GetDeviceCaps clears the structure. All other tests should clear the structure to avoid randomness - there might be a third d3d9 implementation where the author forgot to clear the structure.
Perhaps if we were explicitly testing GetDeviceCaps(), but it's probably basic enough that it's not needed. Everywhere else, the same reasoning applies as for not checking that e.g. HeapAlloc() succeeds in tests.
participants (2)
-
Henri Verbeet -
Stefan Dösinger