From: Alan T. DeKok Date: Wed, 17 May 2017 15:44:48 +0000 (-0400) Subject: move assertion to top of function. Found by PVS-Studio X-Git-Tag: release_3_0_14~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d53ad70de9a07ffa608cf9f392fd3dbd7f71f97;p=thirdparty%2Ffreeradius-server.git move assertion to top of function. Found by PVS-Studio --- diff --git a/src/main/process.c b/src/main/process.c index c3856c7a1ac..7b4196cd22c 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; }