incoming: Remove a few unnecessary initializations
This commit is contained in:
parent
43dd2bf16e
commit
2b40f84b77
|
|
@ -964,15 +964,14 @@ int incoming_parse(struct worker_t *self, struct client_t *c, char *s, int len)
|
||||||
hlog(LOG_DEBUG, "packet too long after inserting new Q construct (%d bytes, max %d)", new_len, PACKETLEN_MAX_LARGE);
|
hlog(LOG_DEBUG, "packet too long after inserting new Q construct (%d bytes, max %d)", new_len, PACKETLEN_MAX_LARGE);
|
||||||
return INERR_LONG_PACKET;
|
return INERR_LONG_PACKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* get a new packet buffer of the correct size; it is zeroed by pbuf_get. */
|
||||||
pb = pbuf_get(self, new_len);
|
pb = pbuf_get(self, new_len);
|
||||||
if (!pb) {
|
if (!pb) {
|
||||||
// This should never happen... LOG_CRIT error logged in pbuf_get()
|
// This should never happen... LOG_CRIT error logged in pbuf_get()
|
||||||
//hlog(LOG_DEBUG, "pbuf_get failed to get packet buffer");
|
//hlog(LOG_DEBUG, "pbuf_get failed to get packet buffer");
|
||||||
return INERR_OUT_OF_PBUFS; // No room :-(
|
return INERR_OUT_OF_PBUFS; // No room :-(
|
||||||
}
|
}
|
||||||
pb->next = NULL; // OPTIMIZE: pbuf arrives pre-zeroed, this could be removed maybe?
|
|
||||||
pb->flags = 0;
|
|
||||||
|
|
||||||
/* store the source reference */
|
/* store the source reference */
|
||||||
pb->origin = c;
|
pb->origin = c;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue