aboutsummaryrefslogtreecommitdiffstats
path: root/src/link_udp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-02 17:45:56 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-02 17:45:56 +0100
commitdb3684ee6111c53bf8dc1d75eef7ee0e6977b4dd (patch)
tree0c4589c96a06d01e4c8bca8721a372ad025f56ba /src/link_udp.c
parent72722c34b0d6e5db4dbd71dc844acedc574a2ae3 (diff)
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.
Diffstat (limited to 'src/link_udp.c')
-rw-r--r--src/link_udp.c6
1 files 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;