[gtk+] Avoid a C99ism
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid a C99ism
- Date: Wed, 8 Feb 2012 12:30:09 +0000 (UTC)
commit c2512d1c0381c52bb4c94c5a25b97ae569c16c0b
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 8 07:26:25 2012 -0500
Avoid a C99ism
Move variable declarations to the beginning of the block.
https://bugzilla.gnome.org/show_bug.cgi?id=669511
gtk/gtkcsstypes.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcsstypes.c b/gtk/gtkcsstypes.c
index dde741e..84db936 100644
--- a/gtk/gtkcsstypes.c
+++ b/gtk/gtkcsstypes.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]