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
Unknown Object (File)
Wed, Nov 19, 5:43 PM
Unknown Object (File)
Wed, Nov 19, 5:43 PM
Unknown Object (File)
Wed, Nov 19, 5:39 PM
Unknown Object (File)
Wed, Nov 19, 5:38 PM
Unknown Object (File)
Wed, Nov 19, 5:35 PM
Unknown Object (File)
Wed, Nov 19, 12:58 AM
Unknown Object (File)
Tue, Nov 18, 11:26 PM
Unknown Object (File)
Tue, Nov 18, 9:48 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