From 217f61a252c1e9d7da6fbfb8a30c421b4a264a8a Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 12 Jul 2015 21:14:04 -0500 Subject: Remove logically dead code from CL_GetServerStatus Found by Coverity. --- src/client/cl_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 77df2e01..0199a520 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -149,7 +149,6 @@ typedef struct serverStatus_s } serverStatus_t; serverStatus_t cl_serverStatusList[MAX_SERVERSTATUSREQUESTS]; -int serverStatusCount; #if defined __USEA3D && defined __A3D_GEOM void hA3Dg_ExportRenderGeom (refexport_t *incoming_re); @@ -4005,11 +4004,7 @@ serverStatus_t *CL_GetServerStatus( netadr_t from ) { oldestTime = cl_serverStatusList[i].startTime; } } - if (oldest != -1) { - return &cl_serverStatusList[oldest]; - } - serverStatusCount++; - return &cl_serverStatusList[serverStatusCount & (MAX_SERVERSTATUSREQUESTS-1)]; + return &cl_serverStatusList[oldest]; } /* -- cgit