- case IN:
- a = (*x)->in;
- b = (*y)->in;
- break;
- case OUT:
- a = (*x)->out;
- b = (*y)->out;
- break;
- case TOTAL:
- a = (*x)->total;
- b = (*y)->total;
- break;
- case LASTSEEN:
- a = (*x)->u.host.last_seen_mono;
- b = (*y)->u.host.last_seen_mono;
- break;
- default:
- errx(1, "cmp: unknown direction: %d", dir);
+ case IN:
+ return cmp_u64((*x)->in, (*y)->in);
+ case OUT:
+ return cmp_u64((*x)->out, (*y)->out);
+ case TOTAL:
+ return cmp_u64((*x)->total, (*y)->total);
+ case LASTSEEN:
+ return cmp_i64((*x)->u.host.last_seen_mono,
+ (*y)->u.host.last_seen_mono);
+ default:
+ errx(1, "cmp: unknown direction: %d", dir);