Xext: vidmode: ProcVidModeSetGammaRamp() simplify payload write out
WriteToClient() already checks for zero-length buffer and does nothing in that case. So we can make the code a bit easier to read and also allow further simplification of reply submission by upcoming commits. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									9b661813f1
								
							
						
					
					
						commit
						285610b283
					
				| 
						 | 
				
			
			@ -1585,11 +1585,8 @@ ProcVidModeGetGammaRamp(ClientPtr client)
 | 
			
		|||
        SwapShorts((short *) ramp, length * 3);
 | 
			
		||||
    }
 | 
			
		||||
    WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), &rep);
 | 
			
		||||
 | 
			
		||||
    if (stuff->size) {
 | 
			
		||||
        WriteToClient(client, ramplen, ramp);
 | 
			
		||||
        free(ramp);
 | 
			
		||||
    }
 | 
			
		||||
    WriteToClient(client, ramplen, ramp);
 | 
			
		||||
    free(ramp);
 | 
			
		||||
 | 
			
		||||
    return Success;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue