--- src/usr.sbin/zic/zic.c 2004/04/23 17:39:53 1.4 +++ src/usr.sbin/zic/zic.c 2004/11/25 01:01:33 1.5 @@ -1321,11 +1321,14 @@ puttzcode(const long val, FILE * const f } static int -atcomp(void *avp, void *bvp) +atcomp(const void *avp, const void *bvp) { - if (((struct attype *) avp)->at < ((struct attype *) bvp)->at) + const struct attype *ap = avp; + const struct attype *bp = bvp; + + if (ap->at < bp->at) return -1; - else if (((struct attype *) avp)->at > ((struct attype *) bvp)->at) + else if (ap->at > bp->at) return 1; else return 0; }