From 2d53ad70de9a07ffa608cf9f392fd3dbd7f71f97 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 17 May 2017 11:44:48 -0400 Subject: [PATCH] move assertion to top of function. Found by PVS-Studio --- src/main/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/process.c b/src/main/process.c index c3856c7..7b4196c 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -485,6 +485,8 @@ static struct timeval *request_response_window(REQUEST *request) { VERIFY_REQUEST(request); + rad_assert(request->home_server != NULL); + if (request->client) { /* * The client hasn't set the response window. Return @@ -500,7 +502,6 @@ static struct timeval *request_response_window(REQUEST *request) } } - rad_assert(request->home_server != NULL); return &request->home_server->response_window; } -- 2.1.4