From 2b40f84b7753e3ed7e5ef4a7890f1be4f45106e4 Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Mon, 31 Oct 2022 18:05:01 +0200 Subject: [PATCH] incoming: Remove a few unnecessary initializations --- src/incoming.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/incoming.c b/src/incoming.c index a76d842..6dda7df 100644 --- a/src/incoming.c +++ b/src/incoming.c @@ -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); 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); if (!pb) { // This should never happen... LOG_CRIT error logged in pbuf_get() //hlog(LOG_DEBUG, "pbuf_get failed to get packet buffer"); 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 */ pb->origin = c;