top: fix sorting by pid (-o pid)

The 'pid' order was added, but the equivalent comparator was not back in
8b800d3af2 ("Add the PID column to the list of sort keys.").
`ordernames` indices need to match `compares` indices in order for this
to work.

A future commit will restructure all of this to make it less error prone
going forward (see D37083).

MFC after:	3 days
Reviewed by:	pstef (D37083)
This commit is contained in:
Kyle Evans 2023-02-13 00:39:04 -06:00
parent f123c6c425
commit deb63adf94

View File

@ -1567,6 +1567,7 @@ int (*compares[])(const void *arg1, const void *arg2) = {
compare_ivcsw,
compare_jid,
compare_swap,
compare_pid,
NULL
};