Set errno to 0 before calling strtoul

We check errno for failure, so ensure its cleared first. (#573922)
This commit is contained in:
Alexander Larsson 2009-04-07 15:32:16 +02:00
parent 4774d9c1fd
commit bb093cf44c

View File

@ -396,6 +396,7 @@ extract_time_from_startup_id (const gchar* startup_id)
/* Skip past the "_TIME" part */ /* Skip past the "_TIME" part */
timestr += 5; timestr += 5;
errno = 0;
timestamp = strtoul (timestr, &end, 0); timestamp = strtoul (timestr, &end, 0);
if (end != timestr && errno == 0) if (end != timestr && errno == 0)
retval = timestamp; retval = timestamp;