kstat_lookup and friends should take const strings
Right now kstat_lookup takes char* which means passing constants requires casts and compiler grumbles.
The parameters are all obviously const and should be constified.
Updated by Robert Mustacchi almost 2 years ago
To test this I ran a
kstat -p before and after this change. I then opened the two files up in vimdiff. While there were a few changes to things like snaptime, and things that measured usage, the actual set of stats with a few exceptions (e.g. which tasks had instances) were the same.
Updated by Electric Monk almost 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 617b28ccfac40348ebae033171d0643fcca18c22 Author: Robert Mustacchi <email@example.com> Date: 2021-12-18T23:07:51.000Z 14264 kstat_lookup and friends should take const strings Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>