Skip to content

Conversation

@Karlson2k
Copy link
Contributor

Readability improvements only, without functional changes.

A subset from #1305

@alejandro-colomar

lib/utmp.c Outdated
{
struct utmpx *ut;
struct utmpx *ret = NULL;
struct utmpx *ut;
Copy link
Collaborator

@alejandro-colomar alejandro-colomar Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the two spaces after the base type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use two spaces after the base type.

Never saw such requirements.
Could you be specific?
When two spaces after base type should be used in variables definitions?
When point is used?
When base type is aggregate?
When both (pointer to an aggregate type)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inherited those rules from NGINX Unit, which itself has rules similar to NGINX.

The NGINX rules are documented here: https://nginx.org/en/docs/dev/development_guide.html#code_style
(Search for 'Variables'.)

The difference in the NGINX Unit project (and shadow) is that the * is aligned as if it were part of the name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to copy at least this short explanation to some file/document.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, eventually.

Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
@Karlson2k Karlson2k force-pushed the refactor-utmp-search branch from 7b44c8d to ea98f35 Compare July 18, 2025 17:45
@alejandro-colomar
Copy link
Collaborator

Merged as part of #1305

@Karlson2k Karlson2k deleted the refactor-utmp-search branch July 19, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants