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
F84287403: D9694.id25438.diff
Tue, May 21, 9:18 PM
F84258114: D9694.id25479.diff
Tue, May 21, 1:50 PM
F84256007: D9694.id.diff
Tue, May 21, 1:04 PM
Unknown Object (File)
Wed, May 15, 7:54 PM
Unknown Object (File)
Wed, May 8, 3:59 PM
Unknown Object (File)
Wed, May 8, 2:55 PM
Unknown Object (File)
Wed, May 1, 10:23 AM
Unknown Object (File)
Feb 22 2024, 2:12 PM
Subscribers

Details

Summary

These were caught by coccinelle.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #25479)

Maybe '\0' instead of NUL?

sys/libkern/iconv_xlat16.c
271 ↗(On Diff #25479)

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.