[gtk+: 1/4] Set errno to 0 before calling strtoul



commit bb093cf44c96cdf0076712b509e7e305cf57bdaa
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 7 15:32:16 2009 +0200

    Set errno to 0 before calling strtoul
    
    We check errno for failure, so ensure its cleared first. (#573922)
---
 gtk/gtkwindow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6dce148..4bbd53e 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]