Page MenuHomeFreeBSD

sed: Use S_ISREG.
ClosedPublic

Authored by delphij on Jan 8 2016, 6:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 3, 7:54 AM
Unknown Object (File)
Wed, Jan 1, 5:41 PM
Unknown Object (File)
Nov 29 2024, 9:19 AM
Unknown Object (File)
Nov 23 2024, 6:39 AM
Unknown Object (File)
Nov 22 2024, 1:37 PM
Unknown Object (File)
Nov 21 2024, 5:47 PM
Unknown Object (File)
Oct 17 2024, 5:55 AM
Unknown Object (File)
Oct 16 2024, 5:35 PM
Subscribers

Details

Summary

Use S_ISREG instead of manual & (also it's better to compare the
result from & and the pattern instead of just assuming it's one bit
value).

Pointed out by Tianjie Mao <tjmao tjmao com>.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1996
Build 2004: arc lint + arc unit

Event Timeline

delphij retitled this revision from to Use S_ISREG..
delphij updated this object.
delphij edited the test plan for this revision. (Show Details)
delphij added a reviewer: des.
delphij retitled this revision from Use S_ISREG. to sed: Use S_ISREG..Jan 8 2016, 6:34 AM
This revision was automatically updated to reflect the committed changes.

This change breaks sed -i on symlinks which breaks lots of ports.