Skip to content

format: clean up errant spaces.#1593

Closed
jcpunk wants to merge 1 commit intoshadow-maint:masterfrom
jcpunk:space-fix
Closed

format: clean up errant spaces.#1593
jcpunk wants to merge 1 commit intoshadow-maint:masterfrom
jcpunk:space-fix

Conversation

@jcpunk
Copy link
Copy Markdown
Contributor

@jcpunk jcpunk commented Mar 18, 2026

This commit should have zero functional changes, but remove the no longer expected space between a function and its arguments.

@alejandro-colomar
Copy link
Copy Markdown
Collaborator

The problem with such a huge patch would be that downstream is going to have problems rebasing patches. But I'm fine with this, FWIW. (I haven't reviewed yet, but the idea seems reasonable.)

@alejandro-colomar
Copy link
Copy Markdown
Collaborator

BTW, if this has been scripted, please paste the scripts in the commit message, so that it can be fully reproduced and investigated.

}

tp = localtime (&(fail->fail_time));
tp = localtime(&(fail->fail_time));

Check failure

Code scanning / CodeQL

Use of potentially dangerous function Critical

Call to 'localtime' is potentially dangerous.
* grief.
*/
(void) execle (file, arg, (char *) NULL, envp);
(void) execle(file, arg, (char *) NULL, envp);

Check failure

Code scanning / CodeQL

Uncontrolled process operation High

The value of this argument may come from
an environment variable
and is being passed to execle.
The value of this argument may come from
an environment variable
and is being passed to execle.
continue;
}
if (set_locktime_one (pwent->pw_uid, locktime)) {
if (set_locktime_one(pwent->pw_uid, locktime)) {

Check warning

Code scanning / CodeQL

Potential exposure of sensitive system data to an unauthorized control sphere Medium

This operation potentially exposes sensitive system data from
*call to getpwent
.
continue;
}
if (setmax_one (pwent->pw_uid, max)) {
if (setmax_one(pwent->pw_uid, max)) {

Check warning

Code scanning / CodeQL

Potential exposure of sensitive system data to an unauthorized control sphere Medium

This operation potentially exposes sensitive system data from
*call to getpwent
.
continue;
}
if (reset_one (pwent->pw_uid)) {
if (reset_one(pwent->pw_uid)) {

Check warning

Code scanning / CodeQL

Potential exposure of sensitive system data to an unauthorized control sphere Medium

This operation potentially exposes sensitive system data from
*call to getpwent
.
@ikerexxe
Copy link
Copy Markdown
Collaborator

The problem with such a huge patch would be that downstream is going to have problems rebasing patches. But I'm fine with this, FWIW. (I haven't reviewed yet, but the idea seems reasonable.)

I definitely share those concerns, it’s going to be a headache for downstream rebases (my future self included!).

While I agree the change itself is reasonable and I won't block it, I have enough mixed feelings that I’m going to softly abstain from a formal approval. I’m happy to let this land if the rest of the team is comfortable with the tradeoff.

@alejandro-colomar
Copy link
Copy Markdown
Collaborator

The problem with such a huge patch would be that downstream is going to have problems rebasing patches. But I'm fine with this, FWIW. (I haven't reviewed yet, but the idea seems reasonable.)

I definitely share those concerns, it’s going to be a headache for downstream rebases (my future self included!).

While I agree the change itself is reasonable and I won't block it, I have enough mixed feelings that I’m going to softly abstain from a formal approval. I’m happy to let this land if the rest of the team is comfortable with the tradeoff.

I think we've been surviving well with the gradual removal of spaces in new or modified code. I'm also going to abstain. Unless someone voices strong support for this patch, I think it might be better to not do it.

@hallyn
Copy link
Copy Markdown
Member

hallyn commented Mar 20, 2026

(lemme think about this for a bit. I do think git apply --ignore-whitespace or whatever may make it not so horrendous for downstreams. But so often I have cursed having to backport across such things. And actually when I look at the patch, i find the old lines easier to read :)

This commit should have zero functional changes, but remove the no
longer expected space between a function and its arguments.

Generated with:
find lib/ libsubid/ src/ -type f -name \*.[ch] -exec sed -i -E '
/^[ \t]*$/b
/^[ \t]*#/b
/\/\*/,/\*\//b
/\/\//b
s/([[:alpha:]]) \(/\1(/g
s/\b(if|else|for|while|switch|do|return|case|default|break|continue|goto|sizeof|_Alignof|alignof|_Generic|typeof|__typeof__|__alignof__|asm|__asm|__asm__)\(/\1 (/g
' {} \;

Signed-off-by: Pat Riehecky <[email protected]>
@jcpunk
Copy link
Copy Markdown
Contributor Author

jcpunk commented Mar 20, 2026

And actually when I look at the patch, i find the old lines easier to read :)

If it isn't worth merging, I'm not offended if you close this out unmerged.

@hallyn
Copy link
Copy Markdown
Member

hallyn commented Mar 23, 2026

Thanks @jcpunk. I'm going to go ahead and close this, mainly because although some tools offer ways to ignore the whitespaces when backporting patches, I'm worried that some, like quilt, will just drive a maintainer to drink.

@hallyn hallyn closed this Mar 23, 2026
@jcpunk
Copy link
Copy Markdown
Contributor Author

jcpunk commented Mar 24, 2026

No worries

I'll leave the find/sed here just so it isn't lost as I delete the branch later:

find lib/ libsubid/ src/ -type f -name \*.[ch] -exec sed -i -E '
/^[ \t]*$/b
/^[ \t]*#/b
/\/\*/,/\*\//b
/\/\//b
s/([[:alpha:]]) \(/\1(/g
s/\b(if|else|for|while|switch|do|return|case|default|break|continue|goto|sizeof|_Alignof|alignof|_Generic|typeof|__typeof__|__alignof__|asm|__asm|__asm__)\(/\1 (/g
' {} \;

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.

4 participants