Page MenuHomeFreeBSD

sed: Use S_ISREG.
ClosedPublic

Authored by delphij on Jan 8 2016, 6:33 AM.
Tags
None
Referenced Files
F172841564: D4827.id.diff
Mon, Sep 21, 12:03 PM
Unknown Object (File)
Fri, Sep 18, 7:29 PM
Unknown Object (File)
Thu, Sep 17, 10:42 PM
Unknown Object (File)
Sun, Sep 13, 6:24 AM
Unknown Object (File)
Fri, Sep 11, 11:59 PM
Unknown Object (File)
Fri, Sep 11, 7:09 PM
Unknown Object (File)
Fri, Sep 11, 4:20 AM
Unknown Object (File)
Thu, Sep 10, 1:03 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 Not Applicable
Unit
Tests Not Applicable

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.