Page MenuHomeFreeBSD

sys: replace most zeros with NULL for pointers.
ClosedPublic

Authored by pfg on Feb 20 2017, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 21, 2:29 AM
Unknown Object (File)
Mon, Jan 20, 8:21 AM
Unknown Object (File)
Nov 28 2024, 11:30 PM
Unknown Object (File)
Nov 28 2024, 6:33 PM
Unknown Object (File)
Nov 28 2024, 6:33 PM
Unknown Object (File)
Nov 28 2024, 6:33 PM
Unknown Object (File)
Nov 28 2024, 6:32 PM
Unknown Object (File)
Nov 28 2024, 6:12 PM
Subscribers

Details

Summary

These were caught by coccinelle.

Diff Detail

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

Event Timeline

pfg retitled this revision from to sys: replace most zeros with NULL for pointers..
pfg updated this object.
pfg edited the test plan for this revision. (Show Details)
pfg added a reviewer: imp.

Remove some changes, at least one false positive.

imp edited edge metadata.

These are all correct and represent better style than the previous code. It won't change the semantics of the code even on architectures where a null-pointer has bits set because comparison to or assignment to 0 is special in 'C'. Since it improves the style, and doesn't change the semantics, this is a good change.

This revision is now accepted and ready to land.Feb 21 2017, 6:54 PM
sys/libkern/iconv_xlat16.c
271

Maybe '\0' instead of NUL?

sys/libkern/iconv_xlat16.c
271

Hmm.. I thought I had reverted this change.
Yes, thanks! '\0' should work. I will commit it after testing.

This revision was automatically updated to reflect the committed changes.