[PATCH] winex11: Get rid of unnecessary assignments.

Józef Kucia jkucia at codeweavers.com
Wed May 30 06:00:27 CDT 2018


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/winex11.drv/xvidmode.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index f055c3a53d05..ba9cdf76642e 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -368,7 +368,7 @@ static void interpolate_gamma_ramp(WORD *dst_r, WORD *dst_g, WORD *dst_b, unsign
 static BOOL xf86vm_get_gamma_ramp(struct x11drv_gamma_ramp *ramp)
 {
     WORD *red, *green, *blue;
-    BOOL ret = FALSE;
+    BOOL ret;
 
     if (xf86vm_gammaramp_size == GAMMA_RAMP_SIZE)
     {
@@ -378,7 +378,7 @@ static BOOL xf86vm_get_gamma_ramp(struct x11drv_gamma_ramp *ramp)
     }
     else
     {
-        if (!(red = heap_calloc(3 * xf86vm_gammaramp_size, sizeof(*red))))
+        if (!(red = heap_calloc(xf86vm_gammaramp_size, 3 * sizeof(*red))))
             return FALSE;
         green = red + xf86vm_gammaramp_size;
         blue = green + xf86vm_gammaramp_size;
@@ -397,7 +397,7 @@ static BOOL xf86vm_get_gamma_ramp(struct x11drv_gamma_ramp *ramp)
 static BOOL xf86vm_set_gamma_ramp(struct x11drv_gamma_ramp *ramp)
 {
     WORD *red, *green, *blue;
-    BOOL ret = FALSE;
+    BOOL ret;
 
     if (xf86vm_gammaramp_size == GAMMA_RAMP_SIZE)
     {
@@ -407,7 +407,7 @@ static BOOL xf86vm_set_gamma_ramp(struct x11drv_gamma_ramp *ramp)
     }
     else
     {
-        if (!(red = heap_calloc(3 * xf86vm_gammaramp_size, sizeof(*red))))
+        if (!(red = heap_calloc(xf86vm_gammaramp_size, 3 * sizeof(*red))))
             return FALSE;
         green = red + xf86vm_gammaramp_size;
         blue = green + xf86vm_gammaramp_size;
-- 
2.16.1




More information about the wine-devel mailing list