HomeFreeBSD

libc: some style in gai_strerror.c
Concern Raisedbd4dd5d951ea

Description

libc: some style in gai_strerror.c

Reviewed by: emaste, glebius
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D52010

Details

Auditors
mandree
Provenance
kibAuthored on Aug 19 2025, 3:00 AM
Reviewer
emaste
Differential Revision
D52010: libc: preserve errno in gai_strerror()
Parents
rG47d1788c2e98: libc: mark ai_errlist as const
Branches
Unknown
Tags
Unknown

Event Timeline

mandree raised a concern with this commit.EditedAug 19 2025, 11:33 PM
mandree added a subscriber: mandree.

Why do we make return statements look like function calls and add parentheses?
(I've looked via https://cgit.freebsd.org/src/commit/lib/libc/net/gai_strerror.c?id=bd4dd5d951ea022b478c455c3eabb2a1b8cc4936 because apparently reviews.freebsd.org doesn't load the diff for me)

This commit now has outstanding concerns.Aug 19 2025, 11:33 PM

Why do we make return statements look like function calls and add parentheses?
(I've looked via https://cgit.freebsd.org/src/commit/lib/libc/net/gai_strerror.c?id=bd4dd5d951ea022b478c455c3eabb2a1b8cc4936 because apparently reviews.freebsd.org doesn't load the diff for me)

Because this is style(9), consistent across the three.

And, why are you commenting there, the most weird place to follow-up to the commit.