dbwrap_tool: Simplify persistent/non-persistent check / dbwrap_tool: Avoid an unnecessary "else"

Swen Schillig swen at vnet.ibm.com
Wed Sep 5 06:17:08 UTC 2018


On Tue, 2018-09-04 at 09:02 -0700, Jeremy Allison wrote:
> On Tue, Sep 04, 2018 at 09:10:19AM +0200, Swen Schillig via samba-
> technical wrote:
> > I guess what's a bit distracting is the fact
> > that a logical result is gathered by an addition.
> > 
> > Would an XOR not be more clear here ?
> > 
> > if (persistent ^ non_persistent) {
> > ...
> 
> Good god NO! Sorry Swen, but that is just
> unreadable :-).
> 

Ha ha ha, fair enough.
...maybe someone should invent a logical XOR for C.

Cheers Swen




More information about the samba-technical mailing list