Page MenuHomeFreeBSD

diff3: Use logical operations for booleans, not bitwise
ClosedPublic

Authored by emaste on Tue, Nov 18, 5:08 PM.
Tags
None
Referenced Files
F136702352: D53808.id.diff
Tue, Nov 18, 11:26 PM
F136686873: D53808.diff
Tue, Nov 18, 9:48 PM
F136682350: D53808.id166695.diff
Tue, Nov 18, 9:22 PM
F136681852: D53808.id166711.diff
Tue, Nov 18, 9:19 PM
F136679251: D53808.diff
Tue, Nov 18, 9:03 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.

Hmm, should also be && I guess.

incompat is actually an int that's incremented, so is not necessarily 0/1. explicitly compare != 0
leave bitwise & in place as that's what's still in the upstream GNU diff3

contrib/diff/src/diff3.c
304

This changes the semantics if incompat is neither 0 nor 1. Could have been a bug before, but could also be intentional.

I

contrib/diff/src/diff3.c
304

It was a bug; as the comment suggests any of the options AeExX3 without m should imply edscript. incompat is incremented for each of these options. Upstream has this fixed in a different way.

This revision is now accepted and ready to land.Tue, Nov 18, 6:24 PM