From e19931e27d55fa6a9fd3bd9f027fafd9ecfe45b8 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 17 May 2017 11:46:57 -0400 Subject: [PATCH] move assertion to correct place. Found by PVS-Studio --- src/main/detail.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/detail.c b/src/main/detail.c index 633364f..3c0e95c 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -385,6 +385,8 @@ int detail_recv(rad_listen_t *listener) rcode = read(data->master_pipe[0], &packet, sizeof(packet)); if (rcode <= 0) return rcode; + rad_assert(packet != NULL); + if (DEBUG_ENABLED2) { VALUE_PAIR *vp; vp_cursor_t cursor; @@ -396,7 +398,6 @@ int detail_recv(rad_listen_t *listener) debug_pair(vp); } } - rad_assert(packet != NULL); switch (packet->code) { case PW_CODE_ACCOUNTING_REQUEST: -- 2.1.4