Re: [ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

2013-01-10 Thread Ethan Jackson
> I'd be more comfortable with a plain abort(), if that's OK. > Ah yes, that's actually what I meant. Just mistyped. Thanks, Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

2013-01-10 Thread Ben Pfaff
On Thu, Jan 10, 2013 at 12:55:09PM -0800, Ethan Jackson wrote: > Out of curiosity, did you consider the name xassert() as an alternative to > ovs_assert()? It has the advantage of following our established convention. I was taking the "x" prefix to indicate a function wrapper that aborts on error

Re: [ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

2013-01-10 Thread Ethan Jackson
Out of curiosity, did you consider the name xassert() as an alternative to ovs_assert()? It has the advantage of following our established convention. +static int reentry; > I'm not sure if the C spec strictly requires it, but I would feel more comfortable if we initialized this to 0 explici

Re: [ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

2012-12-04 Thread Ben Pfaff
On Wed, Nov 07, 2012 at 10:48:16AM -0800, Ben Pfaff wrote: > An occasionally significant problem with the standard "assert" macro is > that it writes the failure message to stderr. In our daemons, stderr is > generally redirected to /dev/null. It's more useful to write the failure > message to th

[ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

2012-11-07 Thread Ben Pfaff
An occasionally significant problem with the standard "assert" macro is that it writes the failure message to stderr. In our daemons, stderr is generally redirected to /dev/null. It's more useful to write the failure message to the log, which is what the new ovs_assert macro introduced in this pa