From f1be0e6af2e204805a8bc2e8cadf828b9fa46c98 Mon Sep 17 00:00:00 2001
From: Antonio Borneo <borneo.antonio@gmail.com>
Date: Sat, 10 Apr 2010 22:25:22 +0800
Subject: [PATCH] HELPER/LOG: review unused symbols

Remove unused functions:
- log_catch
- log_rethrow
- log_try

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
---
 src/helper/log.c | 38 --------------------------------------
 src/helper/log.h |  8 --------
 2 files changed, 46 deletions(-)

diff --git a/src/helper/log.c b/src/helper/log.c
index 7450fef50..7ace93026 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -114,44 +114,6 @@ static void log_forward(const char *file, unsigned line, const char *function, c
 	}
 }
 
-void log_try(void)
-{
-	log_forward_count++;
-}
-
-void log_catch(void)
-{
-	assert(log_forward_count>0);
-	log_forward_count--;
-}
-
-void log_rethrow(void)
-{
-	log_catch();
-	if (log_forward_count==0)
-	{
-		struct store_log_forward *log;
-
-		log = log_head;
-		while (log != NULL)
-		{
-			log_forward(log->file, log->line, log->function, log->string);
-
-			struct store_log_forward *t=log;
-			log = log->next;
-
-			free((void *)t->file);
-			free((void *)t->function);
-			free((void *)t->string);
-			free(t);
-
-		}
-
-		log_head = NULL;
-	}
-}
-
-
 /* The log_puts() serves to somewhat different goals:
  *
  * - logging
diff --git a/src/helper/log.h b/src/helper/log.h
index b936fee10..2852140b0 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -80,14 +80,6 @@ void kept_alive(void);
 void alive_sleep(uint64_t ms);
 void busy_sleep(uint64_t ms);
 
-/* log entries can be paused and replayed roughly according to the try/catch/rethrow
- * concepts in C++
- */
-void log_try(void);
-void log_catch(void);
-void log_rethrow(void);
-
-
 typedef void (*log_callback_fn)(void *priv, const char *file, unsigned line,
 		const char *function, const char *string);
 
-- 
GitLab