Improve cmp function parameter namings and casts

No semantic change.
3 files changed