minor code touch-up
This commit is contained in:
parent
268ed090ec
commit
7710d57968
@ -765,7 +765,7 @@ hio_dns_msg_t* hio_dns_make_msg (hio_t* hio, hio_dns_bhdr_t* bhdr, hio_dns_bqr_t
|
|||||||
msgbufsz = HIO_SIZEOF(*msg) + HIO_ALIGN_POW2(pktlen, HIO_SIZEOF_VOID_P) + xtnsize;
|
msgbufsz = HIO_SIZEOF(*msg) + HIO_ALIGN_POW2(pktlen, HIO_SIZEOF_VOID_P) + xtnsize;
|
||||||
|
|
||||||
/* TODO: msg buffer reuse */
|
/* TODO: msg buffer reuse */
|
||||||
msg = hio_callocmem(hio, msgbufsz);
|
msg = (hio_dns_msg_t*)hio_callocmem(hio, msgbufsz);
|
||||||
if (HIO_UNLIKELY(!msg)) return HIO_NULL;
|
if (HIO_UNLIKELY(!msg)) return HIO_NULL;
|
||||||
|
|
||||||
msg->msglen = msgbufsz; /* record the instance size */
|
msg->msglen = msgbufsz; /* record the instance size */
|
||||||
|
@ -357,7 +357,7 @@ hio_svc_htts_t* hio_svc_htts_start (hio_t* hio, hio_dev_sck_bind_t* sck_bind, hi
|
|||||||
info.m.on_connect = listener_on_connect;
|
info.m.on_connect = listener_on_connect;
|
||||||
info.m.on_disconnect = listener_on_disconnect;
|
info.m.on_disconnect = listener_on_disconnect;
|
||||||
htts->lsck = hio_dev_sck_make(hio, HIO_SIZEOF(*cli), &info.m);
|
htts->lsck = hio_dev_sck_make(hio, HIO_SIZEOF(*cli), &info.m);
|
||||||
if (!htts->lsck) goto oops;
|
if (HIO_UNLIKELY(!htts->lsck)) goto oops;
|
||||||
|
|
||||||
/* the name 'cli' for the listening socket is awkward.
|
/* the name 'cli' for the listening socket is awkward.
|
||||||
* the listening socket will use the htts and sck fields for tracking only.
|
* the listening socket will use the htts and sck fields for tracking only.
|
||||||
|
Loading…
Reference in New Issue
Block a user