From b4b68b8e80e65b5887cbf426c0e06ad0780a238b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 12 Jul 2015 21:14:04 -0500 Subject: [PATCH] Remove logically dead code from CL_GetServerStatus Found by Coverity. --- code/client/cl_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index f411151a..43f741f7 100644 --- a/code/client/cl_main.c +++ b/code/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); @@ -3866,11 +3865,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]; } /*