Page MenuHomeFreeBSD

PR230720: strptime: allow blank-padding for %k and %l
ClosedPublic

Authored by yuripv on Oct 30 2018, 12:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 25, 12:28 PM
Unknown Object (File)
Sat, Jun 22, 5:21 AM
Unknown Object (File)
May 11 2024, 1:55 PM
Unknown Object (File)
May 10 2024, 1:02 AM
Unknown Object (File)
Apr 20 2024, 1:40 PM
Unknown Object (File)
Jan 15 2024, 9:23 PM
Unknown Object (File)
Dec 28 2023, 4:51 PM
Unknown Object (File)
Dec 22 2023, 10:49 PM

Details

Summary

strptime: allow blank-padding for %k and %l. Both are extensions and documented as being blank-padded in strftime(3).

Test Plan

Test cases added to lib/libc/tests/time.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/libc/stdtime/strptime.c
285 ↗(On Diff #49792)

I must admit that this is somewhat unusual way to write the cast. *(unsigned char *)buf is more typical.

yuripv added inline comments.
lib/libc/stdtime/strptime.c
285 ↗(On Diff #49792)

Should I fix it or leave it as it seems to follow other casts in this file?

lib/libc/stdtime/strptime.c
285 ↗(On Diff #49792)

It was a note, not the change request. It is indeed looks unusual.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 3 2018, 11:37 PM
This revision was automatically updated to reflect the committed changes.