Page MenuHomeFreeBSD

Try to make eflag easier to follow
ClosedPublic

Authored by thj on May 26 2022, 1:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 15, 9:15 AM
Unknown Object (File)
Sat, Jan 11, 4:51 PM
Unknown Object (File)
Dec 21 2024, 10:18 PM
Unknown Object (File)
Dec 11 2024, 3:06 PM
Unknown Object (File)
Oct 9 2024, 7:58 AM
Unknown Object (File)
Oct 8 2024, 4:44 AM
Unknown Object (File)
Oct 8 2024, 12:37 AM
Unknown Object (File)
Oct 4 2024, 5:59 AM

Details

Summary

no functional change intended

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
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
115

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.