From a9ffe90f61a87d4c244fb8e1296831cbfc417a5f Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Thu, 2 Jul 2009 19:48:28 -0300
Subject: [PATCH 03/25] libfiu: Put a global static variable inside the only function that uses it

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 libfiu/fiu.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libfiu/fiu.c b/libfiu/fiu.c
index f0c344b..5c3218d 100644
--- a/libfiu/fiu.c
+++ b/libfiu/fiu.c
@@ -88,9 +88,6 @@ __thread int rec_count = 0;
 /* Used to keep the last failinfo via TLS */
 static pthread_key_t last_failinfo_key;
 
-/* Used to avoid re-initialization, protected by enabled_fails_lock */
-static int initialized = 0;
-
 
 /*
  * Miscelaneous internal functions
@@ -219,6 +216,9 @@ static void atfork_child(void)
  * time without clashes. */
 int fiu_init(unsigned int flags)
 {
+	/* Used to avoid re-initialization, protected by enabled_fails_lock */
+	static int initialized = 0;
+
 	rec_count++;
 	ef_wlock();
 	if (initialized) {
-- 
1.6.2.2.646.gb214

