Page MenuHomeFreeBSD

ng_sample: improve styling
ClosedPublic

Authored by p.mousavizadeh_protonmail.com on May 14 2025, 10:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 8:46 PM
Unknown Object (File)
Wed, Sep 24, 9:54 AM
Unknown Object (File)
Mon, Sep 22, 2:17 AM
Unknown Object (File)
Fri, Sep 19, 7:39 AM
Unknown Object (File)
Sep 4 2025, 9:22 AM
Unknown Object (File)
Aug 30 2025, 3:37 AM
Unknown Object (File)
Aug 20 2025, 4:08 PM
Unknown Object (File)
Aug 7 2025, 2:13 AM

Details

Summary

Most of the developers used the (resp == NULL) style in their code. New developers will try to follow the ng_sample and may use the (!resp) style which is not consistent with other netgraph modules, also not recommended by MISRA-C.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy added a subscriber: ivy.
ivy added inline comments.
sys/netgraph/ng_sample.c
323

while you're here, i believe this extra space is a typo that could be removed.

This revision is now accepted and ready to land.May 14 2025, 2:45 PM
kp added a subscriber: kp.

We don't follow MISRA-C, but style(9) does also require this, so the change should be made anyway.

This revision now requires review to proceed.May 15 2025, 2:18 PM
des added a subscriber: des.

@ivy why don't you land this

This revision is now accepted and ready to land.May 16 2025, 12:26 PM
p.mousavizadeh_protonmail.com retitled this revision from ng_sample: As defined in MISRA-C, use resp == NULL to ng_sample: ng_sample: improve styling.May 16 2025, 8:11 PM
p.mousavizadeh_protonmail.com retitled this revision from ng_sample: ng_sample: improve styling to ng_sample: improve styling.May 16 2025, 8:18 PM
This revision was automatically updated to reflect the committed changes.