From bb093cf44c96cdf0076712b509e7e305cf57bdaa Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 7 Apr 2009 15:32:16 +0200 Subject: [PATCH] Set errno to 0 before calling strtoul We check errno for failure, so ensure its cleared first. (#573922) --- gtk/gtkwindow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 6dce1485c7..4bbd53e0ce 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -395,7 +395,8 @@ extract_time_from_startup_id (const gchar* startup_id) /* Skip past the "_TIME" part */ timestr += 5; - + + errno = 0; timestamp = strtoul (timestr, &end, 0); if (end != timestr && errno == 0) retval = timestamp;