Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some trivial improvements in strftime(3)-related code #1065

Merged
merged 5 commits into from
Aug 23, 2024

Conversation

alejandro-colomar
Copy link
Collaborator

No description provided.

%F is specified by ISO C99.  It adds semantic meaning as printing an
ISO 8601 date.

Scripted change:

	$ cat ~/tmp/spatch/strftime_F.sp
	@@
	@@

	- "%Y-%m-%d"
	+ "%F"
	$ find contrib/ lib* src/ -type f \
	| xargs spatch --sp-file ~/tmp/spatch/strftime_F.sp --in-place

Signed-off-by: Alejandro Colomar <[email protected]>
If localtime_r(3) fails, just print future, as we do in day_to_str().
It should only fail for unrealistic dates, if at all.

Signed-off-by: Alejandro Colomar <[email protected]>
@alejandro-colomar alejandro-colomar marked this pull request as ready for review August 11, 2024 19:43
Just like we do in day_to_str().

Signed-off-by: Alejandro Colomar <[email protected]>
strftime(3) is not a variadic function; there's exactly one argument
after the format string.

Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
@hallyn hallyn merged commit 5c0b99c into shadow-maint:master Aug 23, 2024
9 checks passed
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