try_merge (struct dns_transmit *d)
{
    int i = 0;

    for (i = 0; i < MAXUDP; i++)
    {
        if (!inprogress[i])
            continue;
        if (!merge_equal(d, inprogress[i]))
            continue;

        d->master = inprogress[i];
        inprogress[i]->slaves[inprogress[i]->nslaves++] = d;
        return 1;
    }

    return 0;
}
try_merge (struct dns_transmit *d)
{
    int i = 0;

    for (i = 0; i < MAXUDP; i++)
    {
        if (!inprogress[i])
            continue;
        if (!merge_equal(d, inprogress[i]))
            continue;

        d->master = inprogress[i];
        inprogress[i]->slaves[inprogress[i]->nslaves++] = d;
        return 1;
    }

    return 0;
}