]> Pileus Git - ~andy/gtk/commitdiff
Avoid a C99ism
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Feb 2012 12:26:25 +0000 (07:26 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 8 Feb 2012 12:26:25 +0000 (07:26 -0500)
Move variable declarations to the beginning of the block.
https://bugzilla.gnome.org/show_bug.cgi?id=669511

gtk/gtkcsstypes.c

index dde741ecd980cea270354cc160db538fd89f3a38..84db93653c185a18d5198809c5c10e46c6c0e568 100644 (file)
@@ -131,9 +131,6 @@ _gtk_css_number_print (const GtkCssNumber *number,
 {
   char buf[G_ASCII_DTOSTR_BUF_SIZE];
 
-  g_return_if_fail (number != NULL);
-  g_return_if_fail (string != NULL);
-
   const char *names[] = {
     /* [GTK_CSS_NUMBER] = */ "",
     /* [GTK_CSS_PERCENT] = */ "%",
@@ -151,6 +148,9 @@ _gtk_css_number_print (const GtkCssNumber *number,
     /* [GTK_CSS_TURN] = */ "turn",
   };
 
+  g_return_if_fail (number != NULL);
+  g_return_if_fail (string != NULL);
+
   g_ascii_dtostr (buf, sizeof (buf), number->value);
   g_string_append (string, buf);
   if (number->value != 0.0)