urlmon/tests: Clarify ok() condition

André Hentschel nerv at dawncrow.de
Sat Oct 25 09:35:31 CDT 2014


For https://bugs.winehq.org/show_bug.cgi?id=37127

"V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '==' operator. url.c 767

...
ok(size == no_callback ? 512 : 13, "size=%d\n", size);
...

The precedence of the "==" operator is higher than that of '?:', so the size variable is not compared to the values 512 and 13. The expression is always true as it evaluates either to 512 or 13, which means this check doesn't check anything."



---
 dlls/urlmon/tests/url.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-urlmon-tests-Clarify-ok-condition.txt
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20141025/1523b2e0/attachment.bin>


More information about the wine-patches mailing list