Switch up comparator mapping to avoid these kinds of errors, use a
simple array of (name, comparator) pairs rather than having to maintain
entries in two separate arrays that must have matching indices.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 49832 Build 46723: arc lint + arc unit
Event Timeline
Comment Actions
Whoops, good shout. Just axing this entirely:
, but the `equivalent comparator wasn't added at that time.[...]
usr.bin/top/machine.c | ||
---|---|---|
1667–1668 | Switch to designated initializers? |
usr.bin/top/machine.c | ||
---|---|---|
1667–1668 | It's a bit awkward since we're cross-referencing between two arrays, but yeah, good point- I'll go ahead and switch this to a simple array of string, comparator pairs |
Comment Actions
I'm going to commit the previous version of this as a stupid simple fix to get into 13.2, but still wanted to improve this.
usr.bin/top/machine.c | ||
---|---|---|
237 | Could this array be const? |