format: clean up errant spaces.#1593
Conversation
|
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.) |
|
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
| * grief. | ||
| */ | ||
| (void) execle (file, arg, (char *) NULL, envp); | ||
| (void) execle(file, arg, (char *) NULL, envp); |
Check failure
Code scanning / CodeQL
Uncontrolled process operation High
| 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
| 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
| 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
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. |
|
(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]>
If it isn't worth merging, I'm not offended if you close this out unmerged. |
|
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. |
|
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
' {} \; |
This commit should have zero functional changes, but remove the no longer expected space between a function and its arguments.