default initialize source_timeout with -1 so we have a sane timeout value
authorTim Janik <timj@gtk.org>
Mon, 21 Dec 1998 03:28:25 +0000 (03:28 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 21 Dec 1998 03:28:25 +0000 (03:28 +0000)
Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>

        * gmain.c (g_main_iterate): default initialize source_timeout with -1
        so we have a sane timeout value if (*prpare) doesn't set it.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmain.c
gmain.c

index 84b2630..db644f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index 84b2630..db644f3 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
+
+       * gmain.c (g_main_iterate): default initialize source_timeout with -1
+       so we have a sane timeout value if (*prpare) doesn't set it.
+
 Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>
 
        * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
index c3586ac..360821d 100644 (file)
@@ -436,7 +436,7 @@ g_main_iterate (gboolean block,
                gboolean dispatch)
 {
   GHook *hook;
-  GTimeVal current_time;
+  GTimeVal current_time  ={ 0, 0 };
   gint n_ready = 0;
   gint current_priority = 0;
   gint timeout;
@@ -468,7 +468,7 @@ g_main_iterate (gboolean block,
     {
       GSource *source = (GSource *)hook;
       GHook *tmp;
-      gint source_timeout;
+      gint source_timeout = -1;
 
       if ((n_ready > 0) && (source->priority > current_priority))
        break;
diff --git a/gmain.c b/gmain.c
index c3586ac..360821d 100644 (file)
--- a/gmain.c
+++ b/gmain.c
@@ -436,7 +436,7 @@ g_main_iterate (gboolean block,
                gboolean dispatch)
 {
   GHook *hook;
-  GTimeVal current_time;
+  GTimeVal current_time  ={ 0, 0 };
   gint n_ready = 0;
   gint current_priority = 0;
   gint timeout;
@@ -468,7 +468,7 @@ g_main_iterate (gboolean block,
     {
       GSource *source = (GSource *)hook;
       GHook *tmp;
-      gint source_timeout;
+      gint source_timeout = -1;
 
       if ((n_ready > 0) && (source->priority > current_priority))
        break;