Skip to content

src/login_nopam.c: Simplify some code#1643

Open
alejandro-colomar wants to merge 12 commits into
shadow-maint:masterfrom
alejandro-colomar:sm
Open

src/login_nopam.c: Simplify some code#1643
alejandro-colomar wants to merge 12 commits into
shadow-maint:masterfrom
alejandro-colomar:sm

Conversation

@alejandro-colomar

@alejandro-colomar alejandro-colomar commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Calling strcaseeq() explicitly is more readable, and it allows removing
the comments.  The code becomes simpler.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
@alejandro-colomar alejandro-colomar changed the title src/login_nopam.c: Remove string_match() src/login_nopam.c: Simplify some code Jun 14, 2026
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This simplifies the conditionals, allowing the removal of 'else's.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This will allow reducing indentation for the rest of the code.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
@alejandro-colomar alejandro-colomar force-pushed the sm branch 5 times, most recently from 63eaa26 to 1012790 Compare June 14, 2026 13:59
Signed-off-by: Alejandro Colomar <alx@kernel.org>
And rename the iterator to the usual 'i'.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This makes the logic more readable, and removes one variable.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
line and perm point to the same thing, but perm is more appropriate.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
And remove some superfluous braces.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
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.

1 participant