src/context.c
static int
transaction_id_cmp(const void *id1, const void *id2)
{
    if (id1 == NULL && id2 == NULL) {
        return 0;
    } else if (id1 == NULL && id2 != NULL) {
        return 1;
    } else if (id1 != NULL && id2 == NULL) {
        return -1;
    } else {
        getdns_transaction_t t1 =
            *((const getdns_transaction_t *) id1);
        getdns_transaction_t t2 =
            *((const getdns_transaction_t *) id2);
        if (t1 == t2) {
            return 0;
        } else if (t1 > t2) {
            return -1;
        } else {
            return 1;
        }
    }
}
/* compare of transaction ids in DESCENDING order
   so that 0 comes last
*/
compare of transaction ids in DESCENDING order
so that 0 comes last
compare of transaction ids in DESCENDING order so that 0 comes last
static int
transaction_id_cmp(const void *id1, const void *id2)
{
    if (id1 == NULL && id2 == NULL) {
        return 0;
    } else if (id1 == NULL && id2 != NULL) {
        return 1;
    } else if (id1 != NULL && id2 == NULL) {
        return -1;
    } else {
        getdns_transaction_t t1 =
            *((const getdns_transaction_t *) id1);
        getdns_transaction_t t2 =
            *((const getdns_transaction_t *) id2);
        if (t1 == t2) {
            return 0;
        } else if (t1 > t2) {
            return -1;
        } else {
            return 1;
        }
    }
}
static int transaction_id_cmp ( const void * id1 , const void * id2 ) { if ( id1 == NULL && id2 == NULL ) { return 0 ; } else if ( id1 == NULL && id2 != NULL ) { return 1 ; } else if ( id1 != NULL && id2 == NULL ) { return -1 ; } else { getdns_transaction_t t1 = * ( ( const getdns_transaction_t * ) id1 ) ; getdns_transaction_t t2 = * ( ( const getdns_transaction_t * ) id2 ) ; if ( t1 == t2 ) { return 0 ; } else if ( t1 > t2 ) { return -1 ; } else { return 1 ; } } }
compare of transaction ids in DESCENDING order
so that 0 comes last
compare of transaction ids in DESCENDING order so that 0 comes last