[PATCH] services: Fix some weird sizeof usages.
dank at kegel.com
Sun Oct 21 13:27:45 CDT 2012
Christian Costa wrote:
@@ -952,7 +952,7 @@ BOOL service_send_command( struct service_entry
*service, HANDLE pipe,
r = GetOverlappedResult( pipe, &overlapped, &count, FALSE );
- if (!r || count != sizeof *result)
+ if (!r || count != sizeof(*result))
I was curious about this, so I looked around a bit.
There are about 800 instances of sizeof without parens in Wine
vs. 34628 with.
I would have thought "Heck, this is just like return without
parentheses, it emphasizes that it's not a function call,
maybe it's a good idea."
But it seems it's only legal to use it without parentheses for values;
you need the parentheses when getting sizeof a type. cf.
Does anybody feel strongly one way or the other?
More information about the wine-devel