From db3684ee6111c53bf8dc1d75eef7ee0e6977b4dd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 2 Mar 2016 17:45:56 +0100 Subject: [PATCH] logging: Fix logging after introduction of the early check The introduction of a 'if + do {} while' lead to not being able to return the result of the logging anymore. Just return. --- src/link_udp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/link_udp.c b/src/link_udp.c index e1fabc6..85f6c09 100644 --- a/src/link_udp.c +++ b/src/link_udp.c @@ -305,8 +305,10 @@ void snmp_mtp_callback(struct snmp_mtp_session *session, struct mtp_link *link; ulink = session->data; - if (!ulink) - return LOGP(DINP, LOGL_ERROR, "Failed to find link_id %d\n", link_id); + if (!ulink) { + LOGP(DINP, LOGL_ERROR, "Failed to find link_id %d\n", link_id); + return; + } link = ulink->base;