On Sun, Sep 7, 2008 at 5:59 AM, Reece Dunn msclrhd@googlemail.com wrote:
This fixes these crypt32:chain testGetCertChain tests on Vista and Windows 2008.
- ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %d\n", GetLastError()); + ok(!ret, "Expected CertGetCertificateChain to fail\n"); + ok(GetLastError() == ERROR_INVALID_DATA || + GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista/win2k8 */,
I'm not NACK'ing this patch, but for future reference, please put comments *after* the comma or logical OR marker, and each system condition should be on its own line. I've seen this in several patches recently. While it's syntactically OK, it looks wrong and there's no need for everyone to have to play Find The Comma. Yes there are other places in the code where this happens, but that doesn't make it correct or preferable. For example, the following is significantly easier to read:
ok(result == ERROR_BUFFER_TOO_SMALL || result == ERROR_INVALID_USER_BUFFER || /* win98 */ result == ERROR_INVALID_DATA, /* Vista */ "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
than
ok(result == ERROR_BUFFER_TOO_SMALL || result == ERROR_INVALID_USER_BUFFER /* win98 */ || result == ERROR_INVALID_DATA /* Vista */, "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);