Page MenuHomeFreeBSD

sys/kern: Use C99 fixed-width integer types.
ClosedPublic

Authored by jhb on Dec 23 2021, 7:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 7:23 AM
Unknown Object (File)
Mar 10 2024, 10:30 PM
Unknown Object (File)
Mar 10 2024, 10:30 PM
Unknown Object (File)
Mar 10 2024, 10:30 PM
Unknown Object (File)
Mar 10 2024, 10:15 PM
Unknown Object (File)
Jan 13 2024, 12:05 AM
Unknown Object (File)
Dec 20 2023, 2:49 AM
Unknown Object (File)
Dec 6 2023, 10:39 PM
Subscribers

Details

Summary

No functional change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Dec 23 2021, 7:37 PM
jhb created this revision.
kib added inline comments.
sys/kern/vfs_syscalls.c
117

I used BSD type there to match namei.

This revision is now accepted and ready to land.Dec 23 2021, 8:09 PM
sys/kern/vfs_syscalls.c
117

style(9) says (in part)

The project prefers the use of ISO/IEC 9899:1999 (“ISO C99”) unsigned
integer identifiers of the form uintXX_t rather than the older BSD-style
integer identifiers of the form u_intXX_t.

I wonder if we can/should add a statement about uintXX_t being equivalent to u_intXX_t and it being OK to mix and match types in new/old code?

sys/kern/vfs_syscalls.c
117

I wonder if we can/should add a statement about uintXX_t being equivalent to u_intXX_t and it being OK to mix and match types in new/old code?

I'm agnostic. It's likely a good idea, but is starting to stray a bit into advice which we've not traditionally done. But in this case, it seems being explicit is a good thing.

sys/kern/vfs_syscalls.c
117

I've assumed (and this entire series assumes) that we do want the C99 types and that the older ones are just legacy. I.e. new code shouldn't use the old ones. I've tried to find a balance of "small" changes in this series for the kernel of moving away from the legacy types.

sys/kern/vfs_syscalls.c
117

Agreed. Lots of small changes are easier to audit and MFC.

This revision was automatically updated to reflect the committed changes.