mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
Make interval unsigned to match g_timeout_source_new(). (#82624, Tim
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com> * glib/gmain.c (struct _GTimeoutSource): Make interval unsigned to match g_timeout_source_new(). (#82624, Tim Janik.) * glib/gmain.c (g_timeout_prepare): Add some extra gymnastics to avoid signed/unisgned integer overflows.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -1,3 +1,13 @@
|
||||
Thu Jun 13 16:12:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (struct _GTimeoutSource): Make
|
||||
interval unsigned to match g_timeout_source_new().
|
||||
(#82624, Tim Janik.)
|
||||
|
||||
* glib/gmain.c (g_timeout_prepare): Add some
|
||||
extra gymnastics to avoid signed/unisgned integer
|
||||
overflows.
|
||||
|
||||
Thu Jun 13 15:57:46 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* INSTALL.in: Add a note about the deficiency
|
||||
|
@@ -153,7 +153,7 @@ struct _GTimeoutSource
|
||||
{
|
||||
GSource source;
|
||||
GTimeVal expiration;
|
||||
gint interval;
|
||||
guint interval;
|
||||
};
|
||||
|
||||
struct _GPollRec
|
||||
@@ -2937,11 +2937,11 @@ g_timeout_prepare (GSource *source,
|
||||
* this at least avoids hanging for long periods of time.
|
||||
*/
|
||||
g_timeout_set_expiration (timeout_source, ¤t_time);
|
||||
msec = timeout_source->interval;
|
||||
msec = MIN (G_MAXINT, timeout_source->interval);
|
||||
}
|
||||
else
|
||||
{
|
||||
msec += sec * 1000;
|
||||
msec = MIN (G_MAXINT, (guint)msec + 1000 * (guint)sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user