[gtk+/parser] xxx: parser rewrite: Set errno to 0



commit 5097696fc2ce50d96a9339b1cc993c94c0c2acea
Author: Benjamin Otte <otte redhat com>
Date:   Wed May 18 19:29:25 2011 +0200

    xxx: parser rewrite: Set errno to 0

 gtk/gtkcssparser.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index dd831f2..0545595 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -496,6 +496,7 @@ _gtk_css_parser_try_int (GtkCssParser *parser,
   if (*parser->data == '+')
     return FALSE;
 
+  errno = 0;
   result = g_ascii_strtoll (parser->data, &end, 10);
   if (errno)
     return FALSE;
@@ -522,6 +523,7 @@ _gtk_css_parser_try_uint (GtkCssParser *parser,
   g_return_val_if_fail (GTK_IS_CSS_PARSER (parser), FALSE);
   g_return_val_if_fail (value != NULL, FALSE);
 
+  errno = 0;
   result = g_ascii_strtoull (parser->data, &end, 10);
   if (errno)
     return FALSE;
@@ -548,6 +550,7 @@ _gtk_css_parser_try_double (GtkCssParser *parser,
   g_return_val_if_fail (GTK_IS_CSS_PARSER (parser), FALSE);
   g_return_val_if_fail (value != NULL, FALSE);
 
+  errno = 0;
   result = g_ascii_strtod (parser->data, &end);
   if (errno)
     return FALSE;



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