Commit f9a1ced5 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Cleanup: Removed unused code

parent 11b9c61a
...@@ -99,7 +99,6 @@ typedef struct log_tag ...@@ -99,7 +99,6 @@ typedef struct log_tag
static log_t loglist[LOG_MAXLOGS]; static log_t loglist[LOG_MAXLOGS];
static int _get_log_id(void); static int _get_log_id(void);
static void _release_log_id(int log_id);
static void _lock_logger(void); static void _lock_logger(void);
static void _unlock_logger(void); static void _unlock_logger(void);
...@@ -614,15 +613,12 @@ void log_write(int log_id, unsigned priority, const char *cat, const char *func, ...@@ -614,15 +613,12 @@ void log_write(int log_id, unsigned priority, const char *cat, const char *func,
void log_write_direct(int log_id, const char *fmt, ...) void log_write_direct(int log_id, const char *fmt, ...)
{ {
va_list ap; va_list ap;
time_t now;
char line[LOG_MAXLINELEN]; char line[LOG_MAXLINELEN];
if (log_id < 0 || log_id >= LOG_MAXLOGS) return; if (log_id < 0 || log_id >= LOG_MAXLOGS) return;
va_start(ap, fmt); va_start(ap, fmt);
now = time(NULL);
_lock_logger(); _lock_logger();
__vsnprintf(line, LOG_MAXLINELEN, fmt, ap); __vsnprintf(line, LOG_MAXLINELEN, fmt, ap);
if (_log_open (log_id)) if (_log_open (log_id))
...@@ -659,17 +655,6 @@ static int _get_log_id(void) ...@@ -659,17 +655,6 @@ static int _get_log_id(void)
return id; return id;
} }
static void _release_log_id(int log_id)
{
/* lock mutex */
_lock_logger();
loglist[log_id].in_use = 0;
/* unlock mutex */
_unlock_logger();
}
static void _lock_logger(void) static void _lock_logger(void)
{ {
#ifndef _WIN32 #ifndef _WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment