(1599) Xext: vidmode: ProcVidModeModModeLine(): move len variable into branch scope
Semantically these are separate values in each branch any only used there, so it's a bit more clean to move the declaration into the branches. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									46c98178f2
								
							
						
					
					
						commit
						6cdbb3c2a9
					
				|  | @ -748,8 +748,6 @@ VidModeModModeLine(ClientPtr client, xXF86VidModeModModeLineReq *stuff); | ||||||
| static int | static int | ||||||
| ProcVidModeModModeLine(ClientPtr client) | ProcVidModeModModeLine(ClientPtr client) | ||||||
| { | { | ||||||
|     int len; |  | ||||||
| 
 |  | ||||||
|     /* limited to local-only connections */ |     /* limited to local-only connections */ | ||||||
|     if (!VidModeAllowNonLocal && !client->local) |     if (!VidModeAllowNonLocal && !client->local) | ||||||
|         return VidModeErrorBase + XF86VidModeClientNotLocal; |         return VidModeErrorBase + XF86VidModeClientNotLocal; | ||||||
|  | @ -759,7 +757,7 @@ ProcVidModeModModeLine(ClientPtr client) | ||||||
|     if (ClientMajorVersion(client) < 2) { |     if (ClientMajorVersion(client) < 2) { | ||||||
|         REQUEST(xXF86OldVidModeModModeLineReq) |         REQUEST(xXF86OldVidModeModModeLineReq) | ||||||
|         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); |         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); | ||||||
|         len = |         int len = | ||||||
|             client->req_len - |             client->req_len - | ||||||
|             bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); |             bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); | ||||||
|         if (len != stuff->privsize) |         if (len != stuff->privsize) | ||||||
|  | @ -786,7 +784,7 @@ ProcVidModeModModeLine(ClientPtr client) | ||||||
|     else { |     else { | ||||||
|         REQUEST(xXF86VidModeModModeLineReq); |         REQUEST(xXF86VidModeModModeLineReq); | ||||||
|         REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); |         REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); | ||||||
|         len = |         int len = | ||||||
|             client->req_len - |             client->req_len - | ||||||
|             bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); |             bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); | ||||||
|         if (len != stuff->privsize) |         if (len != stuff->privsize) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue