diff --git a/src/dns.c b/src/dns.c index dcdc16310..d360f2cdc 100644 --- a/src/dns.c +++ b/src/dns.c @@ -1028,13 +1028,8 @@ struct dns_session *dns_session_new(struct dns_stream_server *dss) goto error; ring_init(&ds->ring, ds->tx_ring_area, DNS_TCP_MSG_RING_MAX_SIZE); - if (!ring_attach(&ds->ring)) { - /* Should never happen - * since we are the first attached - * here - */ - goto error; - } + /* never fail because it is the first watcher attached to the ring */ + DISGUISE(ring_attach(&ds->ring)); if ((ds->task_exp = task_new(tid_bit)) == NULL) goto error;