Updating branch refs/heads/master
         to c66d4f3f3f1a75eb9ce5c96ef3d57bf4bbb1e492 (commit)
       from aa86fdcca7f985841014c29828578f74a1186ba4 (commit)

commit c66d4f3f3f1a75eb9ce5c96ef3d57bf4bbb1e492
Author: Enrico Tröger <enrico.troe...@uvena.de>
Date:   Thu Dec 31 00:50:35 2009 +0100

    Fix possibly uninitialised variable

 lib/speedreader.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/speedreader.c b/lib/speedreader.c
index a31baf4..23b2da5 100644
--- a/lib/speedreader.c
+++ b/lib/speedreader.c
@@ -349,7 +349,7 @@ static gboolean sr_timer(gpointer data)
 static void sr_start(XfdSpeedReader *dialog)
 {
        XfdSpeedReaderPrivate *priv = XFD_SPEED_READER_GET_PRIVATE(dialog);
-       gint wpm = 400, grouping;
+       gint wpm, grouping;
        gint interval;
        const gchar *fontname;
        PangoFontDescription *pfd;
@@ -389,8 +389,9 @@ static void sr_start(XfdSpeedReader *dialog)
 
        /* calculate the rate */
        wpm = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(priv->spin_wpm));
-       if (wpm >= 1)
-               interval = 60000 / wpm;
+       if (wpm < 1)
+               wpm = 400;
+       interval = 60000 / wpm;
 
        /* save the settings */
        priv->dd->speedreader_wpm = wpm;
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to