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)
Sun, Apr 14, 7:26 PM
Unknown Object (File)
Fri, Apr 12, 10:04 PM
Unknown Object (File)
Sun, Mar 31, 1:40 PM
Unknown Object (File)
Jan 27 2024, 6:46 AM
Unknown Object (File)
Jan 17 2024, 10:35 AM
Unknown Object (File)
Dec 23 2023, 12:09 AM
Unknown Object (File)
Dec 12 2023, 1:30 PM
Unknown Object (File)
Nov 22 2023, 4:23 PM

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.