return -1; if (a->addressfamily > b->addressfamily) return +1; if (a->addressfamily < b->addressfamily)
static int ssh_portcmp(void *av, void *bv){    struct ssh_portfwd *a = (struct ssh_portfwd *) av;    struct ssh_portfwd *b = (struct ssh_portfwd *) bv;    int i;    if (a->type > b->type)	return +1;    if (a->type < b->type)	return -1;    if ( (i = nullstrcmp(a->saddr, b->saddr)) != 0)	return i < 0 ? -1 : +1;    if (a->sport > b->sport)	return +1;    if (a->sport < b->sport)	return -1;    if (a->type != 'D') {	if ( (i = nullstrcmp(a->daddr, b->daddr)) != 0)	    return i < 0 ? -1 : +1;	if (a->dport > b->dport)	    return +1;	if (a->dport < b->dport)	    return -1;    }    return 0;}