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)
Feb 22 2024, 2:12 PM
Unknown Object (File)
Jan 17 2024, 1:57 PM
Unknown Object (File)
Dec 28 2023, 12:07 AM
Unknown Object (File)
Dec 20 2023, 3:27 AM
Unknown Object (File)
Dec 2 2023, 2:05 PM
Unknown Object (File)
Nov 27 2023, 4:38 AM
Unknown Object (File)
Sep 6 2023, 1:08 PM
Unknown Object (File)
Sep 6 2023, 1:06 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.