Of course, it works. Maybe you should add an comment for why use sizeof(!(condition)), in order to avoid improper rollback accidentally.
On Sun, Jan 2, 2011 at 10:36, Nick Mathewson <[email protected]> wrote: > On Sat, Dec 25, 2010 at 10:21 PM, Dongsheng Song > <[email protected]> wrote: >> Hi Jones, >> >> Your commit b63ab17 caused VC2010 error C2070: >> >> bufferevent_async.c(409) : error C2070: 'unsigned int': illegal sizeof >> operand >> bufferevent_async.c(434) : error C2070: 'unsigned int': illegal sizeof >> operand >> bufferevent_async.c(473) : error C2070: 'unsigned int': illegal sizeof >> operand >> >> Because you can not use sizeof on bitfield, here is my patch: > > How about this patch instead; it ensures that EVUTIL_ASSERT() still > counts as using a variable, while not breaking when using it with > bitfields. Does it work for you? > > -- > Nick > *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
