Page MenuHomeFreeBSD

Try to make eflag easier to follow
ClosedPublic

Authored by thj on May 26 2022, 1:23 PM.

Details

Summary

no functional change intended

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

thj requested review of this revision.May 26 2022, 1:23 PM
dim added inline comments.
usr.bin/diff3/diff3.c
114

I'd have called this EFLAG_NONE, for consistency; but it's a matter of taste. :)

538–540

I'd write this as:

if ( (!dup && (eflag == EFLAG_OVERLAP || eflag == EFLAG_UNMERGED) || (dup && (eflag == EFLAG_NOOVERLAP || eflag == EFLAG_UNMERGED)) )

and get rid of the bitmasking stuff. You can then also get rid of the comment altogether (or maybe simplify it.)

thj retitled this revision from Try to make eflag easier to follow no functional change intended to Try to make eflag easier to follow.
thj edited the summary of this revision. (Show Details)

simplfy the eflag based on suggestions by dim

This revision was not accepted when it landed; it landed in state Needs Review.Jul 5 2022, 11:37 AM
This revision was automatically updated to reflect the committed changes.