Compare the two links A and B, for a stable sort by link name. */
| 956 | static int |
| 957 | qsort_linkcmp(void const *a, void const *b) |
| 958 | { |
| 959 | struct link const *l = a; |
| 960 | struct link const *m = b; |
| 961 | int cmp = strcmp(l->l_linkname, m->l_linkname); |
| 962 | if (cmp) |
| 963 | return cmp; |
| 964 | |
| 965 | /* The link names are the same. Make the sort stable by comparing |
| 966 | file numbers (where subtraction cannot overflow) and possibly |
| 967 | line numbers (where it can). */ |
| 968 | cmp = l->l_filenum - m->l_filenum; |
| 969 | if (cmp) |
| 970 | return cmp; |
| 971 | return (l->l_linenum > m->l_linenum) - (l->l_linenum < m->l_linenum); |
| 972 | } |
| 973 | |
| 974 | /* Compare the string KEY to the link B, for bsearch. */ |
| 975 | static int |
| 976 | bsearch_linkcmp(void const *key, void const *b) |
| 977 | { |
nothing calls this directly
no outgoing calls
no test coverage detected