[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Fix CID 213278: Constant variable guards dead code

noreply at xfce.org noreply at xfce.org
Fri Jun 7 05:19:11 CEST 2019


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit fe282abe3f979a94dd21830c56563366222905dc
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Jun 6 23:19:05 2019 -0400

    Fix CID 213278: Constant variable guards dead code
---
 savers/gste-popsquares.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/savers/gste-popsquares.c b/savers/gste-popsquares.c
index c7e2874..eac1788 100644
--- a/savers/gste-popsquares.c
+++ b/savers/gste-popsquares.c
@@ -446,10 +446,8 @@ static void
 draw_frame (GSTEPopsquares *pop,
             cairo_t        *cr) {
     int      border = 1;
-    gboolean twitch = FALSE;
     int      x, y;
     int      gw, gh;
-    int      nsquares;
     int      window_width;
     int      window_height;
     GdkWindow *window;
@@ -466,7 +464,6 @@ draw_frame (GSTEPopsquares *pop,
 
     gw = pop->priv->subdivision;
     gh = pop->priv->subdivision;
-    nsquares = gw * gh;
 
     for (y = 0; y < gh; y++) {
         for (x = 0; x < gw; x++) {
@@ -480,11 +477,7 @@ draw_frame (GSTEPopsquares *pop,
             s->color++;
 
             if (s->color == pop->priv->ncolors) {
-                if (twitch && ((g_random_int_range (0, 4)) == 0)) {
-                    randomize_square_colors (pop->priv->squares, nsquares, pop->priv->ncolors);
-                } else {
-                    s->color = g_random_int_range (0, pop->priv->ncolors);
-                }
+                s->color = g_random_int_range (0, pop->priv->ncolors);
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list